Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions db/migration/V0069__Add_mhc_plus_plus_club_tag.SQL
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TYPE "Tag" ADD VALUE 'MHCPlusPlus';
64 changes: 64 additions & 0 deletions db/migration/V0070__Add_mhc_plus_plus_to_discord_club.SQL
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
INSERT INTO "DiscordClub"
(id, name, description, tag)
VALUES
(gen_random_uuid(), 'MHC++', NULL, 'MHCPlusPlus');


DO $$
BEGIN
CASE current_database()
WHEN 'codebloom-prod' THEN
WITH CLUB AS (
SELECT
*
FROM
"DiscordClub"
WHERE
name = 'MHC++'
)
INSERT INTO "DiscordClubMetadata"
(id, "guildId", "leaderboardChannelId", "discordClubId")
SELECT
gen_random_uuid(),
'1048355383728672829',
'1074033436404228206',
CLUB.id
FROM CLUB;

WHEN 'codebloom-stg' THEN
WITH CLUB AS (
SELECT
*
FROM
"DiscordClub"
WHERE
name = 'MHC++'
)
INSERT INTO "DiscordClubMetadata"
(id, "guildId", "leaderboardChannelId", "discordClubId")
SELECT
gen_random_uuid(),
'1389762654452580373',
'1417161536014778388',
CLUB.id
FROM CLUB;

ELSE
WITH CLUB AS (
SELECT
*
FROM
"DiscordClub"
WHERE
name = 'MHC++'
)
INSERT INTO "DiscordClubMetadata"
(id, "guildId", "leaderboardChannelId", "discordClubId")
SELECT
gen_random_uuid(),
'1389762654452580373',
'1463703700697518113',
CLUB.id
FROM CLUB;
END CASE;
END $$;
Binary file added js/public/brands/Mhcpp_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions js/src/lib/api/utils/metadata/tag/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,13 @@ export const TAG_METADATA_LIST: Record<Tag, ApiTypeUtils.TagMetadata> = {
icon: "/brands/BMCC_logo.png",
alt: "BMCC Logo",
},
MhcPlusPlus: {
shortName: "MHC++",
name: "The MHC++ Club | Macaulay Hunter College",
apiKey: "mhcplusplus",
icon: "/brands/Mhcpp_logo.png",
alt: "MHC++ Logo",
},
} as const;

export const UNUSED_TAGS: Tag[] = [Tag.Gwc];
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ public enum Tag {
Ccny("City College of New York"),
Columbia("Columbia University"),
Cornell("Cornell University"),
Bmcc("Borough of Manhattan Community College");
Bmcc("Borough of Manhattan Community College"),
MhcPlusPlus("MHC++");

/** Only applies to school tags. */
// CHECKSTYLE:OFF
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ public static List<Pair<LeaderboardFilterOptions, Tag>> generateAllSupportedTagT
list.add(Pair.of(withOnlyTrue(opt -> opt.columbia(true)), Tag.Columbia));
list.add(Pair.of(withOnlyTrue(opt -> opt.cornell(true)), Tag.Cornell));
list.add(Pair.of(withOnlyTrue(opt -> opt.bmcc(true)), Tag.Bmcc));
list.add(Pair.of(withOnlyTrue(opt -> opt.bmcc(true)), Tag.MhcPlusPlus));

return list;
}
Expand All @@ -39,6 +40,7 @@ public static LeaderboardFilterOptions.LeaderboardFilterOptionsBuilder builderWi
case Columbia -> LeaderboardFilterOptions.builder().columbia(true);
case Cornell -> LeaderboardFilterOptions.builder().cornell(true);
case Bmcc -> LeaderboardFilterOptions.builder().bmcc(true);
case MhcPlusPlus -> LeaderboardFilterOptions.builder().mhcplusplus(true);
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ public class LeaderboardFilterOptions {
@Builder.Default
private final boolean bmcc = false;

@Builder.Default
private final boolean mhcplusplus = false;

public static final LeaderboardFilterOptions DEFAULT =
LeaderboardFilterOptions.builder().build();
}
Loading