File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -47,13 +47,12 @@ function getHostName(ip: string) {
4747async function getHostsInExamMode ( ) {
4848 try {
4949 // The URL below is only accessible from allowed IP ranges. Ask Codam IT for access if developing locally and you get a 403 error
50- const response = await fetch ( "https://exam-rebooter .codam.nl/exam_mode_hosts" ) ;
51- const hosts = await response . json ( ) ;
52- if ( "error" in hosts ) {
53- throw new Error ( hosts [ "error" ] ) ;
50+ const request = await fetch ( "https://clusterdata .codam.nl/api /exam_mode_hosts" ) ;
51+ const response = await request . json ( ) ;
52+ if ( "error" in response ) {
53+ throw new Error ( response [ "error" ] ) ;
5454 }
55- // Translate object into an array (only keep values of true)
56- return Object . keys ( hosts ) . filter ( ( key ) => hosts [ key ] == true ) ;
55+ return response [ "exam_mode_hosts" ] ;
5756 }
5857 catch ( err ) {
5958 console . log ( "Failed to fetch hosts in exam mode: " + err ) ;
You can’t perform that action at this time.
0 commit comments