Skip to content

Commit e0cc4c7

Browse files
committed
Merge branch 'eeen17/siglead-mainscreen-api' into siglead-management
2 parents ef1c727 + f44c400 commit e0cc4c7

File tree

3 files changed

+45
-217
lines changed

3 files changed

+45
-217
lines changed

src/api/functions/entraId.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ import { SecretsManagerClient } from "@aws-sdk/client-secrets-manager";
3030
import { DynamoDBClient } from "@aws-sdk/client-dynamodb";
3131
import { checkPaidMembershipFromTable } from "./membership.js";
3232

33-
function validateGroupId(groupId: string): boolean {
33+
export function validateGroupId(groupId: string): boolean {
3434
const groupIdPattern = /^[a-zA-Z0-9-]+$/; // Adjust the pattern as needed
3535
return groupIdPattern.test(groupId);
3636
}
@@ -369,7 +369,7 @@ export async function listGroupMembers(
369369
* @throws {EntraUserError} If fetching the user profile fails.
370370
* @returns {Promise<UserProfileData>} The user's profile information.
371371
*/
372-
export async function getUserProfile(
372+
export async function getUserProflile(
373373
token: string,
374374
email: string,
375375
): Promise<UserProfileData> {

src/common/orgs.ts

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
import { transformSigLeadToURI } from "./utils.js";
2+
3+
export const SIGList = [
4+
"SIGPwny",
5+
"SIGCHI",
6+
"GameBuilders",
7+
"SIGAIDA",
8+
"SIGGRAPH",
9+
"SIGICPC",
10+
"SIGMobile",
11+
"SIGMusic",
12+
"GLUG",
13+
"SIGNLL",
14+
"SIGma",
15+
"SIGQuantum",
16+
"SIGecom",
17+
"SIGPLAN",
18+
"SIGPolicy",
19+
"SIGARCH",
20+
"SIGRobotics",
21+
"SIGtricity",
22+
] as [string, ...string[]];
23+
24+
export const CommitteeList = [
25+
"Infrastructure Committee",
26+
"Social Committee",
27+
"Mentorship Committee",
28+
"Academic Committee",
29+
"Corporate Committee",
30+
"Marketing Committee",
31+
] as [string, ...string[]];
32+
export const OrganizationList = ["ACM", ...SIGList, ...CommitteeList] as [string, ...string[]];
33+
34+
const orgIds2Name: Record<string, string> = {};
35+
OrganizationList.forEach((org) => {
36+
const sigid = transformSigLeadToURI(org);
37+
orgIds2Name[sigid] = org;
38+
});
39+
export { orgIds2Name };

0 commit comments

Comments
 (0)