Skip to content

Commit 8a18b22

Browse files
committed
bank_id sort
1 parent 074544b commit 8a18b22

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/routes/(protected)/rbac/banks/+page.server.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { SessionOAuthHelper } from "$lib/oauth/sessionHelper";
66
import { error } from "@sveltejs/kit";
77

88
interface Bank {
9-
id: string;
9+
bank_id: string;
1010
short_name: string;
1111
full_name: string;
1212
logo?: string;
@@ -54,8 +54,8 @@ export const load: PageServerLoad = async ({ locals }) => {
5454
const banks = response.banks || [];
5555
logger.info(`Response: ${banks.length} banks`);
5656

57-
// Sort banks by ID
58-
banks.sort((a, b) => a.id.localeCompare(b.id));
57+
// Sort banks by bank_id
58+
banks.sort((a, b) => (a.bank_id || "").localeCompare(b.bank_id || ""));
5959

6060
return {
6161
banks,

0 commit comments

Comments
 (0)