Skip to content

Commit

Permalink
Change inS1 and inS2 MPE to CPEx and fix private key parsing (nusmodi…
Browse files Browse the repository at this point in the history
…fications#3632)

* chore(deps): update dependency postcss to v8.4.31 [security] (nusmodifications#3630)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* feat(cpex): add standalone scraper (nusmodifications#3622)

* chore(cpex): set term to next term instead of current (nusmodifications#3631)

* Change MPE to CPE and Open MPE (nusmodifications#3623)

* Fix serverless function not working (nusmodifications#3623)

* Change modules to courses (nusmodifications#3623)

* Change inS1 and inS2 from mpe to cpex and fix private key parsing (nusmodifications#3623)

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Christopher Goh <chrisgzf@gmail.com>
Co-authored-by: Ravern Koh <ravernkoh@gmail.com>
  • Loading branch information
4 people committed Oct 14, 2023
1 parent d238f45 commit dcd059e
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions scrapers/nus-v2/src/tasks/CollateModules.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,8 @@ const getModuleMPEParticipation = ({
title,
moduleCode,
moduleCredit,
inS1MPE: attributes?.mpes1,
inS2MPE: attributes?.mpes2,
inS1CPEx: attributes?.mpes1,
inS2CPEx: attributes?.mpes2,
});

// Avoid using _.pick here because it is not type safe
Expand Down
4 changes: 2 additions & 2 deletions scrapers/nus-v2/src/types/mpe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ export type MPEModule = Readonly<{
title: ModuleTitle;
moduleCode: ModuleCode;
moduleCredit: string;
inS1MPE?: boolean;
inS2MPE?: boolean;
inS1CPEx?: boolean;
inS2CPEx?: boolean;
}>;
2 changes: 1 addition & 1 deletion website/src/serverless/nus-auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const idp = samlify.IdentityProvider({

const sp = samlify.ServiceProvider({
metadata: fs.readFileSync(path.join(__dirname, './sp.xml')),
encPrivateKey: process.env.NUS_EXCHANGE_SP_PRIVATE_KEY,
encPrivateKey: process.env.NUS_EXCHANGE_SP_PRIVATE_KEY?.replace(/\\n/g, '\n'),
});

export const createLoginURL = (relayState = '') => {
Expand Down
4 changes: 2 additions & 2 deletions website/src/types/mpe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ export type MpeModule = {
title: ModuleTitle;
moduleCode: ModuleCode;
moduleCredit: string;
inS1MPE?: boolean;
inS2MPE?: boolean;
inS1CPEx?: boolean;
inS2CPEx?: boolean;
};

interface ModuleTypeInfo {
Expand Down

0 comments on commit dcd059e

Please sign in to comment.