mirror of
https://github.com/versia-pub/server.git
synced 2026-03-13 13:59:16 +01:00
Add tests for status context
This commit is contained in:
parent
80a3e4c92d
commit
2e7ab312e0
3 changed files with 33 additions and 4 deletions
|
|
@ -1,7 +1,7 @@
|
|||
import { applyConfig } from "@api";
|
||||
import { errorResponse, jsonResponse } from "@response";
|
||||
import { MatchedRoute } from "bun";
|
||||
import { Status, statusRelations } from "~database/entities/Status";
|
||||
import { Status, statusAndUserRelations } from "~database/entities/Status";
|
||||
import { User } from "~database/entities/User";
|
||||
import { APIRouteMeta } from "~types/api";
|
||||
|
||||
|
|
@ -36,7 +36,7 @@ export default async (
|
|||
where: {
|
||||
id,
|
||||
},
|
||||
relations: statusRelations,
|
||||
relations: statusAndUserRelations,
|
||||
});
|
||||
} catch (e) {
|
||||
return errorResponse("Invalid ID", 404);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue