controllers are all POST

This commit is contained in:
Jan Prochazka
2021-12-22 09:18:48 +01:00
parent a108fb749a
commit f0e0fb8f64
13 changed files with 91 additions and 91 deletions

View File

@@ -34,7 +34,7 @@ function readCore(reader, skip, limit, filter) {
}
module.exports = {
read_meta: 'get',
read_meta: true,
async read({ skip, limit, filter }) {
const fileName = path.join(datadir(), 'query-history.jsonl');
// @ts-ignore
@@ -44,7 +44,7 @@ module.exports = {
return res;
},
write_meta: 'post',
write_meta: true,
async write({ data }) {
const fileName = path.join(datadir(), 'query-history.jsonl');
await fs.appendFile(fileName, JSON.stringify(data) + '\n');