fix: Add type annotation for part in delete message promises
This commit is contained in:
@@ -35,7 +35,7 @@ export async function POST(request: Request) {
|
||||
[file_id]
|
||||
);
|
||||
|
||||
const deletePromises = partsRows.map(part => {
|
||||
const deletePromises = partsRows.map((part: { discord_message_id: string }) => {
|
||||
const deleteUrl = `${process.env.DISCORD_WEBHOOK_URL}/messages/${part.discord_message_id}`;
|
||||
return fetch(deleteUrl, { method: 'DELETE' });
|
||||
});
|
||||
|
||||
@@ -36,7 +36,7 @@ export async function POST(request: Request) {
|
||||
);
|
||||
|
||||
// 3. Delete each message from Discord
|
||||
const deletePromises = partsRows.map(part => {
|
||||
const deletePromises = partsRows.map((part: { discord_message_id: string }) => {
|
||||
const deleteUrl = `${process.env.DISCORD_WEBHOOK_URL}/messages/${part.discord_message_id}`;
|
||||
return fetch(deleteUrl, { method: 'DELETE' });
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user