@@ -14,7 +14,7 @@ import ical, {
1414} from "ical-generator" ;
1515import moment from "moment" ;
1616import { getVtimezoneComponent } from "@touch4it/ical-timezones" ;
17- import { OrganizationList } from "../../common/orgs.js " ;
17+ import { CoreOrganizationList } from "@acm-uiuc/js-shared " ;
1818import { CLIENT_HTTP_CACHE_POLICY , EventRepeatOptions } from "./events.js" ;
1919import rateLimiter from "api/plugins/rateLimiter.js" ;
2020import { getCacheCounter } from "api/functions/cache.js" ;
@@ -43,7 +43,7 @@ function generateHostName(host: string) {
4343
4444const icalPlugin : FastifyPluginAsync = async ( fastify , _options ) => {
4545 fastify . register ( rateLimiter , {
46- limit : OrganizationList . length ,
46+ limit : CoreOrganizationList . length ,
4747 duration : 30 ,
4848 rateLimitIdentifier : "ical" ,
4949 } ) ;
@@ -53,7 +53,7 @@ const icalPlugin: FastifyPluginAsync = async (fastify, _options) => {
5353 schema : withTags ( [ "iCalendar Integration" ] , {
5454 params : z . object ( {
5555 host : z
56- . optional ( z . enum ( OrganizationList as [ string , ...string [ ] ] ) )
56+ . optional ( z . enum ( CoreOrganizationList as [ string , ...string [ ] ] ) )
5757 . openapi ( { description : "Host to get calendar for." } ) ,
5858 } ) ,
5959 summary :
@@ -87,7 +87,7 @@ const icalPlugin: FastifyPluginAsync = async (fastify, _options) => {
8787 reply . header ( "etag" , etag ) ;
8888 }
8989 if ( host ) {
90- if ( ! OrganizationList . includes ( host ) ) {
90+ if ( ! CoreOrganizationList . includes ( host ) ) {
9191 throw new ValidationError ( {
9292 message : `Invalid host parameter "${ host } " in path.` ,
9393 } ) ;
0 commit comments