Skip to content

Commit 5f3aa7f

Browse files
committed
fix: fix wrong url used for intra title deletion
1 parent 6b30846 commit 5f3aa7f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/sync/base.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export const prisma = new PrismaClient();
2121

2222
/**
2323
* Fetch all items from all pages of a Fast42 API endpoint.
24-
* @usage const codamStudents = await fetchMultiple42ApiPages(api, '/v2/campus/14/users');
24+
* @usage const codamStudents = await fetchMultiple42ApiPages(api, '/campus/14/users');
2525
* @param api A Fast42 instance
2626
* @param path The API path to fetch
2727
* @param params Optional query parameters for the API request
@@ -66,7 +66,7 @@ export const fetchMultiple42ApiPages = async function(api: Fast42, path: string,
6666
/**
6767
* Fetch all items from all pages of a Fast42 API endpoint, with a callback function for each page fetched.
6868
* Useful for larger datasets that may not fit in memory.
69-
* @usage const codamStudents = await fetchMultiple42ApiPages(api, '/v2/campus/14/users');
69+
* @usage const codamStudents = await fetchMultiple42ApiPages(api, '/campus/14/users');
7070
* @param api A Fast42 instance
7171
* @param path The API path to fetch
7272
* @param params Optional query parameters for the API request

src/sync/titles.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ export const syncTitles = async function(api: Fast42): Promise<void> {
212212
// Remove title on Intra
213213
if (NODE_ENV === 'production' && titleUser.intra_title_user_id) {
214214
console.debug(`Removing Intra title_user ID ${titleUser.intra_title_user_id} for user ${titleUser.user.intra_user.login}...`);
215-
const del = await api.delete(`/v2/titles_users/${titleUser.intra_title_user_id}`, {});
215+
const del = await api.delete(`/titles_users/${titleUser.intra_title_user_id}`, {});
216216
if (!del.ok) {
217217
console.error(`Failed to delete Intra title_user ID ${titleUser.intra_title_user_id} for user ID ${titleUser.user_id}, HTTP status ${del.status} ${del.statusText}`);
218218
}

0 commit comments

Comments
 (0)