lint
This commit is contained in:
parent
accdfd9b9e
commit
700614f3e6
|
@ -12,12 +12,9 @@ export function createPluginsStore() {
|
|||
async function deletePlugin(pluginId, pluginRev) {
|
||||
await API.deletePlugin(pluginId, pluginRev)
|
||||
update(state => {
|
||||
state = state.filter(
|
||||
existing => existing._id !== pluginId
|
||||
)
|
||||
state = state.filter(existing => existing._id !== pluginId)
|
||||
return state
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
async function uploadPlugin(file, source) {
|
||||
|
@ -34,13 +31,12 @@ export function createPluginsStore() {
|
|||
}
|
||||
return state
|
||||
})
|
||||
|
||||
}
|
||||
return {
|
||||
subscribe,
|
||||
load,
|
||||
deletePlugin,
|
||||
uploadPlugin
|
||||
uploadPlugin,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -31,5 +31,4 @@ export const buildPluginEndpoints = API => ({
|
|||
url: `/api/plugin/${pluginId}/${pluginRev}`,
|
||||
})
|
||||
},
|
||||
|
||||
})
|
||||
|
|
|
@ -52,7 +52,6 @@ export async function destroy(ctx: any) {
|
|||
await db.remove(ctx.params.pluginId, ctx.params.pluginRev)
|
||||
ctx.message = `Plugin ${ctx.params.pluginId} deleted.`
|
||||
ctx.status = 200
|
||||
|
||||
}
|
||||
|
||||
export async function processPlugin(plugin: FileType, source?: string) {
|
||||
|
|
|
@ -8,6 +8,10 @@ const router = new Router()
|
|||
router
|
||||
.post("/api/plugin/upload/:source", authorized(BUILDER), controller.upload)
|
||||
.get("/api/plugin", authorized(BUILDER), controller.fetch)
|
||||
.delete("/api/plugin/:pluginId/:pluginRev", authorized(BUILDER), controller.destroy)
|
||||
.delete(
|
||||
"/api/plugin/:pluginId/:pluginRev",
|
||||
authorized(BUILDER),
|
||||
controller.destroy
|
||||
)
|
||||
|
||||
export default router
|
||||
|
|
Loading…
Reference in New Issue