mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 11:29:46 +00:00
return new Response() -> return c.newResponse()
This commit is contained in:
parent
f72fcdbd65
commit
2ce283e9a5
3 changed files with 9 additions and 9 deletions
|
|
@ -171,7 +171,7 @@ export const captchaVerifyController: AppController = async (c) => {
|
||||||
if (solved) {
|
if (solved) {
|
||||||
captchas.delete(id);
|
captchas.delete(id);
|
||||||
await updateUser(pubkey, { captcha_solved: true }, c);
|
await updateUser(pubkey, { captcha_solved: true }, c);
|
||||||
return new Response(null, { status: 204 });
|
return c.newResponse(null, { status: 204 });
|
||||||
}
|
}
|
||||||
|
|
||||||
return c.json({ error: 'Incorrect solution' }, { status: 400 });
|
return c.json({ error: 'Incorrect solution' }, { status: 400 });
|
||||||
|
|
|
||||||
|
|
@ -188,7 +188,7 @@ export const updateZapSplitsController: AppController = async (c) => {
|
||||||
const pubkeys = Object.keys(data);
|
const pubkeys = Object.keys(data);
|
||||||
|
|
||||||
if (pubkeys.length < 1) {
|
if (pubkeys.length < 1) {
|
||||||
return c.json(200);
|
return c.newResponse(null, { status: 204 });
|
||||||
}
|
}
|
||||||
|
|
||||||
await updateListAdminEvent(
|
await updateListAdminEvent(
|
||||||
|
|
@ -200,7 +200,7 @@ export const updateZapSplitsController: AppController = async (c) => {
|
||||||
c,
|
c,
|
||||||
);
|
);
|
||||||
|
|
||||||
return c.json(200);
|
return c.newResponse(null, { status: 204 });
|
||||||
};
|
};
|
||||||
|
|
||||||
const deleteZapSplitSchema = z.array(n.id()).min(1);
|
const deleteZapSplitSchema = z.array(n.id()).min(1);
|
||||||
|
|
@ -231,7 +231,7 @@ export const deleteZapSplitsController: AppController = async (c) => {
|
||||||
c,
|
c,
|
||||||
);
|
);
|
||||||
|
|
||||||
return c.json(200);
|
return c.newResponse(null, { status: 204 });
|
||||||
};
|
};
|
||||||
|
|
||||||
export const getZapSplitsController: AppController = async (c) => {
|
export const getZapSplitsController: AppController = async (c) => {
|
||||||
|
|
@ -346,5 +346,5 @@ export const updateInstanceController: AppController = async (c) => {
|
||||||
c,
|
c,
|
||||||
);
|
);
|
||||||
|
|
||||||
return c.json(204);
|
return c.newResponse(null, { status: 204 });
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -98,7 +98,7 @@ const pleromaAdminTagController: AppController = async (c) => {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return new Response(null, { status: 204 });
|
return c.newResponse(null, { status: 204 });
|
||||||
};
|
};
|
||||||
|
|
||||||
const pleromaAdminUntagController: AppController = async (c) => {
|
const pleromaAdminUntagController: AppController = async (c) => {
|
||||||
|
|
@ -121,7 +121,7 @@ const pleromaAdminUntagController: AppController = async (c) => {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return new Response(null, { status: 204 });
|
return c.newResponse(null, { status: 204 });
|
||||||
};
|
};
|
||||||
|
|
||||||
const pleromaAdminSuggestSchema = z.object({
|
const pleromaAdminSuggestSchema = z.object({
|
||||||
|
|
@ -137,7 +137,7 @@ const pleromaAdminSuggestController: AppController = async (c) => {
|
||||||
await updateUser(pubkey, { suggested: true }, c);
|
await updateUser(pubkey, { suggested: true }, c);
|
||||||
}
|
}
|
||||||
|
|
||||||
return new Response(null, { status: 204 });
|
return c.newResponse(null, { status: 204 });
|
||||||
};
|
};
|
||||||
|
|
||||||
const pleromaAdminUnsuggestController: AppController = async (c) => {
|
const pleromaAdminUnsuggestController: AppController = async (c) => {
|
||||||
|
|
@ -149,7 +149,7 @@ const pleromaAdminUnsuggestController: AppController = async (c) => {
|
||||||
await updateUser(pubkey, { suggested: false }, c);
|
await updateUser(pubkey, { suggested: false }, c);
|
||||||
}
|
}
|
||||||
|
|
||||||
return new Response(null, { status: 204 });
|
return c.newResponse(null, { status: 204 });
|
||||||
};
|
};
|
||||||
|
|
||||||
export {
|
export {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue