summary refs log tree commit diff
path: root/src/api/routes/channels/#channel_id/purge.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/api/routes/channels/#channel_id/purge.ts')
-rw-r--r--src/api/routes/channels/#channel_id/purge.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/api/routes/channels/#channel_id/purge.ts b/src/api/routes/channels/#channel_id/purge.ts

index 05660acf..04d8cfa2 100644 --- a/src/api/routes/channels/#channel_id/purge.ts +++ b/src/api/routes/channels/#channel_id/purge.ts
@@ -19,10 +19,9 @@ import { HTTPError } from "lambert-server"; import { route } from "@fosscord/api"; import { isTextChannel } from "./messages"; -import { FindManyOptions, Between, Not } from "typeorm"; +import { FindManyOptions, Between, Not, FindOperator } from "typeorm"; import { Channel, - Config, emitEvent, getPermission, getRights, @@ -69,7 +68,9 @@ router.post( // TODO: send the deletion event bite-by-bite to prevent client stress - var query: FindManyOptions<Message> & { where: { id?: any } } = { + const query: FindManyOptions<Message> & { + where: { id?: FindOperator<string> }; + } = { order: { id: "ASC" }, // take: limit, where: { @@ -93,7 +94,6 @@ router.post( }; const messages = await Message.find(query); - const endpoint = Config.get().cdn.endpointPublic; if (messages.length == 0) { res.sendStatus(304);