It would be nice to show the current week in AntAlmanac as it does in PeterPortal Core. Let's move this functionality over to the API, and serve it here.
week: {
type: weekType,
// define function to get a course
resolve: // call getWeek function
// documentation
description: "Returns the current Week and Quarter of UCI Instruction."
}
This might have to be changed, but rather than only using today's date, it should also be able to take in a date as a parameter. and use that. (default can be today's date).
It would be nice to show the current week in AntAlmanac as it does in PeterPortal Core. Let's move this functionality over to the API, and serve it here.
In PeterPortal Core, this is the code for getting the current week. https://github.com/icssc-projects/peterportal-client/blob/master/api/src/helpers/week.ts
This endpoint references a MongoDB instance which stores a cached value of the week, so it doesn't always make a request to UCI.
For now, we can comment out the part for caching the week.
TODO:
/rest/v0/schedule/week
. We can do this in/rest/v0/schedule.js
[x] Create a new
GraphQLObject
Type, nameweekType
, with fields:[x] Create a new
GraphQLQuery