@coffer-org/server 1.5.0 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +0 -17
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -298,23 +298,6 @@ app.put('/api/plugins/:id/settings', (req, reply) => {
|
|
|
298
298
|
return { ok: true, row: maskTree(p.settings.fields, row) };
|
|
299
299
|
});
|
|
300
300
|
});
|
|
301
|
-
app.post('/api/plugins/nextcloud/test', async (req, reply) => {
|
|
302
|
-
if (!requireAdmin(req, reply))
|
|
303
|
-
return;
|
|
304
|
-
const settings = await getPluginSettings('nextcloud');
|
|
305
|
-
const url = settings['nextcloud_url'];
|
|
306
|
-
const login = settings['login'];
|
|
307
|
-
const password = settings['password'];
|
|
308
|
-
if (!url || !login || !password) {
|
|
309
|
-
return reply.code(400).send({ error: 'Nextcloud settings not configured. Save them first.' });
|
|
310
|
-
}
|
|
311
|
-
const ncRuntime = '@coffer-org/plugin-nextcloud/runtime';
|
|
312
|
-
const { checkNextcloudConnection } = (await import(__rewriteRelativeImportExtension(ncRuntime)));
|
|
313
|
-
const result = await checkNextcloudConnection(url, login, password);
|
|
314
|
-
if (result.ok)
|
|
315
|
-
return { ok: true };
|
|
316
|
-
return reply.code(400).send({ error: result.error });
|
|
317
|
-
});
|
|
318
301
|
app.post('/api/plugins/finance/test', async (req, reply) => {
|
|
319
302
|
if (!requireAdmin(req, reply))
|
|
320
303
|
return;
|