Remove sorting server-side

This commit is contained in:
orosmatthew 2023-04-29 13:25:22 -04:00
parent 9a9315c5aa
commit 813e51a6e7
2 changed files with 0 additions and 18 deletions

View File

@ -3,15 +3,6 @@ import type { PageServerLoad } from './$types';
export const load = (async () => {
const query = await db.problem.findMany();
query.sort((a, b) => {
if (a.friendlyName < b.friendlyName) {
return -1;
}
if (a.friendlyName > b.friendlyName) {
return 1;
}
return 0;
});
return {
problems: query.map((row) => {
return { id: row.id, friendlyName: row.friendlyName };

View File

@ -3,15 +3,6 @@ import type { Actions, PageServerLoad } from './$types';
export const load = (async () => {
const teams = await db.team.findMany();
teams.sort((a, b) => {
if (a.name < b.name) {
return -1;
}
if (a.name > b.name) {
return 1;
}
return 0;
});
return {
teams: teams.map((row) => {
return { id: row.id, name: row.name };