mirror of
https://github.com/versia-pub/server.git
synced 2026-03-14 06:19:15 +01:00
refactor(api): ♻️ Remove old redirect() and response() in favour of Hono's builtins
This commit is contained in:
parent
691716f7eb
commit
69d7d50239
20 changed files with 188 additions and 174 deletions
|
|
@ -5,7 +5,6 @@ import {
|
|||
handleZodError,
|
||||
idValidator,
|
||||
} from "@/api";
|
||||
import { response } from "@/response";
|
||||
import { zValidator } from "@hono/zod-validator";
|
||||
import { z } from "zod";
|
||||
import { MediaManager } from "~/classes/media/media-manager";
|
||||
|
|
@ -71,7 +70,7 @@ export default apiRoute((app) =>
|
|||
if (attachment.data.url) {
|
||||
return context.json(attachment.toApi());
|
||||
}
|
||||
return response(null, 206);
|
||||
return context.newResponse(null, 206);
|
||||
}
|
||||
case "PUT": {
|
||||
const { description, thumbnail } =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue