Archived
1
0

Rename papi to pluginApi

This commit is contained in:
Asher 2021-02-09 12:40:14 -06:00
parent 2fe3d57df3
commit 3226d50747
No known key found for this signature in database
GPG Key ID: D63C1EF81242354A

View File

@ -115,9 +115,9 @@ export const register = async (
}) })
const workingDir = args._ && args._.length > 0 ? path.resolve(args._[args._.length - 1]) : undefined const workingDir = args._ && args._.length > 0 ? path.resolve(args._[args._.length - 1]) : undefined
const papi = new PluginAPI(logger, process.env.CS_PLUGIN, process.env.CS_PLUGIN_PATH, workingDir) const pluginApi = new PluginAPI(logger, process.env.CS_PLUGIN, process.env.CS_PLUGIN_PATH, workingDir)
await papi.loadPlugins() await pluginApi.loadPlugins()
papi.mount(app, wsApp) pluginApi.mount(app, wsApp)
app.use(bodyParser.json()) app.use(bodyParser.json())
app.use(bodyParser.urlencoded({ extended: true })) app.use(bodyParser.urlencoded({ extended: true }))
@ -141,8 +141,8 @@ export const register = async (
app.use("/static", _static.router) app.use("/static", _static.router)
app.use("/update", update.router) app.use("/update", update.router)
app.use("/api/applications", apps.router(papi)) app.use("/api/applications", apps.router(pluginApi))
wrapper.onDispose(() => papi.dispose()) wrapper.onDispose(() => pluginApi.dispose())
app.use(() => { app.use(() => {
throw new HttpError("Not Found", HttpCode.NotFound) throw new HttpError("Not Found", HttpCode.NotFound)