From 07b78b9ba2f79386d98fdbd74f865c93042b6715 Mon Sep 17 00:00:00 2001 From: Pylogmon Date: Thu, 27 Jun 2024 11:38:57 +0800 Subject: [PATCH] feat: add Database class --- src/utils/invoke_plugin.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/utils/invoke_plugin.js b/src/utils/invoke_plugin.js index 02c8781a80..58209bc07d 100644 --- a/src/utils/invoke_plugin.js +++ b/src/utils/invoke_plugin.js @@ -1,7 +1,7 @@ import { appCacheDir, appConfigDir, join } from "@tauri-apps/api/path"; import { readBinaryFile, readTextFile } from "@tauri-apps/api/fs"; import { invoke } from "@tauri-apps/api/tauri"; -import { fetch } from "@tauri-apps/api/http"; +import Database from "tauri-plugin-sql-api"; import { http } from "@tauri-apps/api"; import CryptoJS from "crypto-js"; import { osType } from "./env"; @@ -22,9 +22,10 @@ export async function invoke_plugin(pluginType, pluginName) { } const utils = { tauriFetch: http.fetch, + http, readBinaryFile, readTextFile, - http, + Database, CryptoJS, run, cacheDir, // String