refactor: 🚨 Remove unnecessary async keywords

This commit is contained in:
Jesse Wierzbinski 2024-10-03 11:43:16 +02:00
parent 132bec4d5b
commit b1d8595a7c
No known key found for this signature in database
10 changed files with 38 additions and 39 deletions

View file

@ -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,

View file

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

View file

@ -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,

View file

@ -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,