admin: Display student needing help on home page
This commit is contained in:
parent
052dacae5b
commit
0cb07a70c4
3 changed files with 54 additions and 0 deletions
|
|
@ -51,6 +51,15 @@ export async function getUserScore(uid, survey) {
|
|||
}
|
||||
}
|
||||
|
||||
export async function getUserNeedingHelp() {
|
||||
const res = await fetch(`api/help`, {headers: {'Accept': 'application/json'}})
|
||||
if (res.status == 200) {
|
||||
return await res.json();
|
||||
} else {
|
||||
throw new Error((await res.json()).errmsg);
|
||||
}
|
||||
}
|
||||
|
||||
export async function getScore(survey) {
|
||||
const res = await fetch(`api/surveys/${survey.id}/score`, {headers: {'Accept': 'application/json'}})
|
||||
if (res.status == 200) {
|
||||
|
|
|
|||
Reference in a new issue