-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* initialize scholar module * wip: create service * base structure * wip: repository and interface * wip * feat: SyncApiKeyAuth * wip: working on scholardb sync * feat: department update * wip * feat: scholarDB update API * feat: Add sync slack logs * refactor: APIKeyAuth set authentication/authorization instead of isPublic * refactor: Remove redundant secret in body * fix: Add missing SkackNotiService * feat: sync examtime * feat: sync classtimes * refactor: syncTime method to handle both examtime and classtime syncing * refactor: Divide sync services * feat: Sync taken lectures * feat: Create schema for saving taken_lecture raw data * fix: sync baseline with prod database * feat: Save raw taken lectures * feat: repopulate taken lectures of new user from rawTakenLecture data * chore: Add needed env vars to .env.example * fix: Allow bigger request for sync requests * fix: Remove Error being logged when jwt auth fails * fix: Nested object becomes empty, english_lec can be "" * chore: console.log related * fix: Fix or skip tests * chore: update jest * fix: Maark lectures not in API as deleted * enhance: syncScholarDB log and result * test: syncScholarDB * test: classtime sync * fix: Time not saved correctly * test: examtime sync * fix: professor id wrongly connected * test: enhance syncScholarDB test * test: syncTakenLecture * fix sync bugs * fix: enlarge type, name_en fields length in schema * fix: handle multiple users with same student_id * fix: timezone related issue
- Loading branch information
Showing
40 changed files
with
3,938 additions
and
794 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import { SetMetadata } from '@nestjs/common'; | ||
|
||
export const USE_SYNC_API_KEY = 'useSyncAPIKey'; | ||
export const SyncApiKeyAuth = () => SetMetadata(USE_SYNC_API_KEY, true); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { Prisma } from '@prisma/client'; | ||
|
||
export namespace EProfessor { | ||
export const Basic = Prisma.validator<Prisma.subject_professorDefaultArgs>()( | ||
{}, | ||
); | ||
export type Basic = Prisma.subject_professorGetPayload<typeof Basic>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { Prisma } from '@prisma/client'; | ||
|
||
export namespace ETakenLecture { | ||
export const Basic = | ||
Prisma.validator<Prisma.session_userprofile_taken_lecturesDefaultArgs>()( | ||
{}, | ||
); | ||
|
||
export type Basic = Prisma.session_userprofile_taken_lecturesGetPayload< | ||
typeof Basic | ||
>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { Prisma } from '@prisma/client'; | ||
import { ETakenLecture } from './ETakenLecture'; | ||
|
||
export namespace EUserProfile { | ||
export const WithTakenLectures = | ||
Prisma.validator<Prisma.session_userprofileDefaultArgs>()({ | ||
include: { taken_lectures: ETakenLecture.Basic }, | ||
}); | ||
|
||
export type WithTakenLectures = Prisma.session_userprofileGetPayload< | ||
typeof WithTakenLectures | ||
>; | ||
} |
Oops, something went wrong.