ci: add pull request quality gates
CI / install-and-build (pull_request) Successful in 1m29s
CI / format (pull_request) Successful in 51s
CI / typecheck-source (pull_request) Successful in 41s
CI / typecheck-tests (pull_request) Successful in 39s
CI / test (pull_request) Successful in 51s
CI / lint (pull_request) Successful in 21s
CI / install-and-build (pull_request) Successful in 1m29s
CI / format (pull_request) Successful in 51s
CI / typecheck-source (pull_request) Successful in 41s
CI / typecheck-tests (pull_request) Successful in 39s
CI / test (pull_request) Successful in 51s
CI / lint (pull_request) Successful in 21s
Co-Authored-By: gpt-5.6-terra <noreply@openai.com>
This commit was merged in pull request #12.
This commit is contained in:
@@ -61,7 +61,7 @@ export function apirouter(db: BackendDbInterface): KoaRouter {
|
||||
jsonBody({ validate: updateuser, includeParams: ["uid"] }),
|
||||
async (ctx) => {
|
||||
ctx.body = await db.updateUser(ctx.request.body);
|
||||
}
|
||||
},
|
||||
);
|
||||
router.delete("/users/:uid", async (ctx) => {
|
||||
await db.deleteUserById(ctx.params.uid);
|
||||
@@ -82,7 +82,7 @@ export function apirouter(db: BackendDbInterface): KoaRouter {
|
||||
async (ctx) => {
|
||||
const [apikey, token] = await db.createApikey(ctx.request.body);
|
||||
ctx.body = { apikey, token };
|
||||
}
|
||||
},
|
||||
);
|
||||
router.get("/users/:uid/apikeys/:kid", async (ctx) => {
|
||||
const apikey = await db.getApikeyById(ctx.params.kid);
|
||||
@@ -118,7 +118,7 @@ export function apirouter(db: BackendDbInterface): KoaRouter {
|
||||
jsonBody({ validate: updateabode, includeParams: ["aid"] }),
|
||||
async (ctx) => {
|
||||
ctx.body = await db.updateAbode(ctx.request.body, { uid: ctx.user!.uid });
|
||||
}
|
||||
},
|
||||
);
|
||||
router.delete("/abodes/:aid", async (ctx) => {
|
||||
await db.deleteAbodeById(ctx.params.aid);
|
||||
@@ -138,7 +138,7 @@ export function apirouter(db: BackendDbInterface): KoaRouter {
|
||||
jsonBody({ validate: createnote, includeParams: ["aid"] }),
|
||||
async (ctx) => {
|
||||
ctx.body = await db.createNote(ctx.request.body, { uid: ctx.user!.uid });
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
router.use("/residents", authenticate(db));
|
||||
@@ -152,7 +152,7 @@ export function apirouter(db: BackendDbInterface): KoaRouter {
|
||||
ctx.body = await db.createResident(ctx.request.body, {
|
||||
uid: ctx.user!.uid,
|
||||
});
|
||||
}
|
||||
},
|
||||
);
|
||||
router.get("/residents/:uid/:aid", async (ctx) => {
|
||||
ctx.body = await db.getResidentById(ctx.params.uid, ctx.params.aid);
|
||||
@@ -164,7 +164,7 @@ export function apirouter(db: BackendDbInterface): KoaRouter {
|
||||
ctx.body = await db.updateResident(ctx.request.body, {
|
||||
uid: ctx.user!.uid,
|
||||
});
|
||||
}
|
||||
},
|
||||
);
|
||||
router.delete("/residents/:uid/:aid", async (ctx) => {
|
||||
await db.deleteResidentById(ctx.params.uid, ctx.params.aid);
|
||||
@@ -192,7 +192,7 @@ export function apirouter(db: BackendDbInterface): KoaRouter {
|
||||
jsonBody({ validate: updatenote, includeParams: ["nid"] }),
|
||||
async (ctx) => {
|
||||
ctx.body = await db.updateNote(ctx.request.body, { uid: ctx.user!.uid });
|
||||
}
|
||||
},
|
||||
);
|
||||
router.delete("/notes/:nid", async (ctx) => {
|
||||
await db.deleteNoteById(ctx.params.nid);
|
||||
|
||||
Reference in New Issue
Block a user