Minor changes to types
This commit is contained in:
parent
2cee46f78a
commit
3d41e28342
@ -3,7 +3,12 @@ import { Collection, FieldTypes, Policies } from "sealious";
|
||||
const tasks = new (class extends Collection {
|
||||
fields = {
|
||||
title: new FieldTypes.Text(),
|
||||
done: new FieldTypes.Boolean(),
|
||||
done: new (class extends FieldTypes.Boolean {
|
||||
hasDefaultValue = () => true;
|
||||
async getDefaultValue() {
|
||||
return false;
|
||||
}
|
||||
})(),
|
||||
};
|
||||
defaultPolicy = new Policies.Public();
|
||||
})();
|
||||
|
@ -15,7 +15,7 @@ declare module "koa" {
|
||||
}
|
||||
|
||||
const app = new TheApp();
|
||||
app.start();
|
||||
void app.start();
|
||||
|
||||
const router = app.HTTPServer.router;
|
||||
router.use("/", homepage.routes());
|
||||
|
@ -13,6 +13,7 @@ router.post(
|
||||
.make({
|
||||
title: ctx.$body.title as string,
|
||||
done: false,
|
||||
is_active: false,
|
||||
})
|
||||
.save(ctx.$context);
|
||||
ctx.body = await MainView(ctx.$context);
|
||||
|
Loading…
x
Reference in New Issue
Block a user