Add tests for status context

This commit is contained in:
Jesse Wierzbinski 2023-10-24 12:23:22 -10:00
parent 80a3e4c92d
commit 2e7ab312e0
No known key found for this signature in database
GPG key ID: F9A1E418934E40B0
3 changed files with 33 additions and 4 deletions

View file

@ -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);