mirror of
https://github.com/versia-pub/server.git
synced 2026-03-13 05:49:16 +01:00
Cleanup files and packages
This commit is contained in:
parent
bc296194b6
commit
fe0cfa547b
12 changed files with 11 additions and 295 deletions
|
|
@ -1,6 +1,3 @@
|
|||
import type { APActivity, APObject } from "activitypub-types";
|
||||
import type { NodeObject } from "jsonld";
|
||||
|
||||
export const response = (
|
||||
data: BodyInit | null = null,
|
||||
status = 200,
|
||||
|
|
@ -55,15 +52,6 @@ export const xmlResponse = (data: string, status = 200) => {
|
|||
});
|
||||
};
|
||||
|
||||
export const jsonLdResponse = (
|
||||
data: NodeObject | APActivity | APObject,
|
||||
status = 200,
|
||||
) => {
|
||||
return response(JSON.stringify(data), status, {
|
||||
"Content-Type": "application/activity+json",
|
||||
});
|
||||
};
|
||||
|
||||
export const errorResponse = (error: string, status = 500) => {
|
||||
return jsonResponse(
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue