operator: add route to get app event log
we cannot go via /cloudron/eventlog since that requires admin
This commit is contained in:
12
src/apps.js
12
src/apps.js
@@ -79,6 +79,8 @@ exports = module.exports = {
|
||||
getIcon,
|
||||
getMemoryLimit,
|
||||
|
||||
listEventlog,
|
||||
|
||||
downloadFile,
|
||||
uploadFile,
|
||||
|
||||
@@ -2287,6 +2289,16 @@ async function schedulePendingTasks() {
|
||||
}
|
||||
}
|
||||
|
||||
async function listEventlog(app, page, perPage) {
|
||||
assert.strictEqual(typeof app, 'object');
|
||||
assert.strictEqual(typeof page, 'number');
|
||||
assert.strictEqual(typeof perPage, 'number');
|
||||
|
||||
const actions = [];
|
||||
const search = app.id;
|
||||
return await eventlog.listPaged(actions, search, page, perPage);
|
||||
}
|
||||
|
||||
function downloadFile(app, filePath, callback) {
|
||||
assert.strictEqual(typeof app, 'object');
|
||||
assert.strictEqual(typeof filePath, 'string');
|
||||
|
||||
Reference in New Issue
Block a user