3
This commit is contained in:
@@ -66,6 +66,9 @@ try {
|
||||
$headers = @{ Authorization = "Bearer $($login.token)" }
|
||||
$dashboard = Invoke-RestMethod -Uri 'http://localhost:5255/api/dashboard' -Headers $headers
|
||||
$campuses = Invoke-RestMethod -Uri 'http://localhost:5255/api/base-data/campuses' -Headers $headers
|
||||
$teachers = Invoke-RestMethod -Uri 'http://localhost:5255/api/personnel/teachers?page=1&pageSize=10' -Headers $headers
|
||||
$students = Invoke-RestMethod -Uri 'http://localhost:5255/api/personnel/students?page=1&pageSize=10' -Headers $headers
|
||||
$courses = Invoke-RestMethod -Uri 'http://localhost:5255/api/courses?page=1&pageSize=10' -Headers $headers
|
||||
$frontend = Invoke-WebRequest -Uri 'http://localhost:5255/' -TimeoutSec 5
|
||||
$spaFallback = Invoke-WebRequest -Uri 'http://localhost:5255/base-data' -TimeoutSec 5
|
||||
$unknownApiParameters = @{
|
||||
@@ -81,6 +84,9 @@ try {
|
||||
User = $login.user.displayName
|
||||
Term = $dashboard.currentTerm.name
|
||||
Campuses = @($campuses).Count
|
||||
Teachers = $teachers.total
|
||||
Students = $students.total
|
||||
Courses = $courses.total
|
||||
StaticIndex = $frontend.Content.Contains('明序教务管理系统')
|
||||
SpaFallback = $spaFallback.StatusCode
|
||||
ApiNotFound = $unknownApi.StatusCode
|
||||
|
||||
Reference in New Issue
Block a user