mirror of
https://github.com/versia-pub/server.git
synced 2026-03-13 05:49:16 +01:00
refactor: 🚨 Remove unnecessary async keywords
This commit is contained in:
parent
132bec4d5b
commit
b1d8595a7c
10 changed files with 38 additions and 39 deletions
|
|
@ -81,7 +81,7 @@ export default apiRoute((app) =>
|
|||
);
|
||||
|
||||
return context.json(
|
||||
await Promise.all(favourites.map(async (note) => note.toApi(user))),
|
||||
await Promise.all(favourites.map((note) => note.toApi(user))),
|
||||
200,
|
||||
{
|
||||
Link: link,
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ const route = createRoute({
|
|||
});
|
||||
|
||||
export default apiRoute((app) =>
|
||||
app.openapi(route, async (context) => {
|
||||
app.openapi(route, (context) => {
|
||||
return context.json(
|
||||
config.signups.rules.map((rule, index) => ({
|
||||
id: String(index),
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ export default apiRoute((app) =>
|
|||
);
|
||||
|
||||
return context.json(
|
||||
await Promise.all(objects.map(async (note) => note.toApi(user))),
|
||||
await Promise.all(objects.map((note) => note.toApi(user))),
|
||||
200,
|
||||
{
|
||||
Link: link,
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ export default apiRoute((app) =>
|
|||
);
|
||||
|
||||
return context.json(
|
||||
await Promise.all(objects.map(async (note) => note.toApi(user))),
|
||||
await Promise.all(objects.map((note) => note.toApi(user))),
|
||||
200,
|
||||
{
|
||||
Link: link,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue