fix(commands): sort services by ID in follow and uptime commands

This commit is contained in:
2025-12-15 09:50:35 +01:00
parent f27bf3f0a9
commit c4c4155d52
2 changed files with 2 additions and 3 deletions

View File

@@ -55,8 +55,7 @@ const cmd: CommandDefinition = {
name: 'service',
execute: async (interaction) => {
const services = await statusService.serviceRepo.find({where: {notify: true}});
const services = await statusService.serviceRepo.find({where: {notify: true}, order: {id: 'ASC'}});
interaction.respond(services.map((v) => ({name: v.name, value: v.name})));
}
}

View File

@@ -44,7 +44,7 @@ const cmd: CommandDefinition = {
{
name: 'service',
execute: async (interaction) => {
const services = await statusService.serviceRepo.find();
const services = await statusService.serviceRepo.find({order: {id: 'ASC'}});
interaction.respond(services.map((v) => ({name: v.name, value: v.name})));
}
}