mirror of
https://github.com/Kuingsmile/PicList.git
synced 2026-06-05 15:50:18 +08:00
34 lines
706 B
TypeScript
34 lines
706 B
TypeScript
import { IRPCActionType } from '#/types/enum'
|
|
import { RPCRouter } from '~/events/rpc/router'
|
|
import {
|
|
pluginGetListFunc,
|
|
pluginImportLocalFunc,
|
|
pluginInstallFunc,
|
|
pluginUpdateAllFunc
|
|
} from '~/events/rpc/routes/plugin/utils'
|
|
|
|
const pluginRouter = new RPCRouter()
|
|
|
|
const pluginRoutes = [
|
|
{
|
|
action: IRPCActionType.PLUGIN_GET_LIST,
|
|
handler: pluginGetListFunc
|
|
},
|
|
{
|
|
action: IRPCActionType.PLUGIN_INSTALL,
|
|
handler: pluginInstallFunc
|
|
},
|
|
{
|
|
action: IRPCActionType.PLUGIN_IMPORT_LOCAL,
|
|
handler: pluginImportLocalFunc
|
|
},
|
|
{
|
|
action: IRPCActionType.PLUGIN_UPDATE_ALL,
|
|
handler: pluginUpdateAllFunc
|
|
}
|
|
]
|
|
|
|
pluginRouter.addBatch(pluginRoutes)
|
|
|
|
export { pluginRouter }
|