Skip to content

Commit

Permalink
Use Cache
Browse files Browse the repository at this point in the history
  • Loading branch information
ingalls committed Oct 1, 2024
1 parent f190abc commit 722bcbb
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions api/routes/marti-subscriptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ export default async function router(schema: Schema, config: Config) {
const api = await TAKAPI.init(new URL(String(config.server.api)), new APIAuthCertificate(profile.auth.cert, profile.auth.key));

const groups: Set<string> = new Set();
(await api.Group.list()).data.forEach((group) => {
(await api.Group.list({
useCache: true
})).data.forEach((group) => {
groups.add(group.name)
});

Expand Down Expand Up @@ -72,7 +74,9 @@ export default async function router(schema: Schema, config: Config) {
});

const groups: Set<string> = new Set();
(await api.Group.list()).data.forEach((group) => {
(await api.Group.list({
useCache: true
})).data.forEach((group) => {
groups.add(group.name)
});

Expand Down

0 comments on commit 722bcbb

Please sign in to comment.