mirror of
https://github.com/DCsunset/taskwarrior-webui.git
synced 2025-08-18 21:43:06 +02:00
fix(backend): update deps and fix types
This commit is contained in:
parent
eb1f3e081b
commit
ddb7dc2ec6
3 changed files with 569 additions and 373 deletions
932
backend/package-lock.json
generated
932
backend/package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -16,7 +16,7 @@
|
||||||
"koa-bodyparser": "^4.3.0",
|
"koa-bodyparser": "^4.3.0",
|
||||||
"koa-logger": "^3.2.1",
|
"koa-logger": "^3.2.1",
|
||||||
"koa-qs": "^3.0.0",
|
"koa-qs": "^3.0.0",
|
||||||
"taskwarrior-lib": "^0.4.2"
|
"taskwarrior-lib": "^0.5.2"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/koa": "^2.11.3",
|
"@types/koa": "^2.11.3",
|
||||||
|
@ -28,7 +28,7 @@
|
||||||
"@typescript-eslint/eslint-plugin": "^3.5.0",
|
"@typescript-eslint/eslint-plugin": "^3.5.0",
|
||||||
"@typescript-eslint/parser": "^3.5.0",
|
"@typescript-eslint/parser": "^3.5.0",
|
||||||
"eslint": "^7.3.1",
|
"eslint": "^7.3.1",
|
||||||
"ts-node": "^8.10.2",
|
"ts-node": "^10.9.1",
|
||||||
"typescript": "^3.9.5"
|
"typescript": "^4.8.4"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
import * as Router from '@koa/router';
|
import * as Router from '@koa/router';
|
||||||
|
|
||||||
import taskwarrior from './taskwarrior';
|
import taskwarrior from './taskwarrior';
|
||||||
|
import { Task } from "taskwarrior-lib";
|
||||||
|
|
||||||
const router = new Router();
|
const router = new Router();
|
||||||
|
|
||||||
|
@ -10,7 +11,8 @@ router.get('/', async ctx => {
|
||||||
});
|
});
|
||||||
|
|
||||||
router.put('/', async ctx => {
|
router.put('/', async ctx => {
|
||||||
const msg = taskwarrior.update(ctx.request.body.tasks);
|
const body = ctx.request.body as { tasks: Task[] };
|
||||||
|
const msg = taskwarrior.update(body.tasks);
|
||||||
console.log(msg);
|
console.log(msg);
|
||||||
ctx.status = 200;
|
ctx.status = 200;
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue