mirror of
https://github.com/BetterSEQTA/BetterSEQTA-Plus.git
synced 2026-06-06 03:34:40 +00:00
chore: remove unused notices network request and add Svelte module declaration
This commit is contained in:
+2
-11
@@ -2272,7 +2272,6 @@ export async function loadHomePage() {
|
|||||||
assessmentsPromise,
|
assessmentsPromise,
|
||||||
classesPromise,
|
classesPromise,
|
||||||
prefsPromise,
|
prefsPromise,
|
||||||
noticesPromise
|
|
||||||
] = [
|
] = [
|
||||||
// Timetable data
|
// Timetable data
|
||||||
fetch(`${location.origin}/seqta/student/load/timetable?`, {
|
fetch(`${location.origin}/seqta/student/load/timetable?`, {
|
||||||
@@ -2296,23 +2295,15 @@ export async function loadHomePage() {
|
|||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: { 'Content-Type': 'application/json' },
|
headers: { 'Content-Type': 'application/json' },
|
||||||
body: JSON.stringify({ asArray: true, request: 'userPrefs' })
|
body: JSON.stringify({ asArray: true, request: 'userPrefs' })
|
||||||
}).then(res => res.json()),
|
|
||||||
|
|
||||||
// Notices data
|
|
||||||
fetch(`${location.origin}/seqta/student/load/notices?`, {
|
|
||||||
method: 'POST',
|
|
||||||
headers: { 'Content-Type': 'application/json' },
|
|
||||||
body: JSON.stringify({ date: TodayFormatted })
|
|
||||||
}).then(res => res.json())
|
}).then(res => res.json())
|
||||||
]
|
]
|
||||||
|
|
||||||
// Process all data in parallel
|
// Process all data in parallel
|
||||||
const [timetableData, assessments, classes, prefs, notices] = await Promise.all([
|
const [timetableData, assessments, classes, prefs] = await Promise.all([
|
||||||
timetablePromise,
|
timetablePromise,
|
||||||
assessmentsPromise,
|
assessmentsPromise,
|
||||||
classesPromise,
|
classesPromise,
|
||||||
prefsPromise,
|
prefsPromise
|
||||||
noticesPromise
|
|
||||||
])
|
])
|
||||||
|
|
||||||
// Process timetable data
|
// Process timetable data
|
||||||
|
|||||||
Vendored
+1
@@ -3,6 +3,7 @@ declare module '*.woff';
|
|||||||
declare module '*.scss';
|
declare module '*.scss';
|
||||||
declare module '*.png';
|
declare module '*.png';
|
||||||
declare module '*.html';
|
declare module '*.html';
|
||||||
|
declare module '*.svelte';
|
||||||
|
|
||||||
declare module "*.png?base64" {
|
declare module "*.png?base64" {
|
||||||
const value: string;
|
const value: string;
|
||||||
|
|||||||
Reference in New Issue
Block a user