-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Маленьний рефактор и правка к определению текущего учебного года
- Loading branch information
Showing
15 changed files
with
36,233 additions
and
8,680 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
import { DonstuAPI } from './instances' | ||
|
||
export const getListYears = () => | ||
DonstuAPI({ | ||
url: `/Rasp/ListYears`, | ||
}) | ||
|
||
export const getTeacherList = (academicYear) => { | ||
if (!academicYear) { | ||
throw new RangeError('invalid academicYear') | ||
} | ||
|
||
return DonstuAPI({ | ||
url: `/raspTeacherlist?year=${academicYear}`, | ||
}) | ||
} | ||
|
||
export const getGroupList = (academicYear) => { | ||
if (!academicYear) { | ||
throw new RangeError('invalid academicYear') | ||
} | ||
|
||
return DonstuAPI({ | ||
url: `/raspGrouplist?year=${academicYear}`, | ||
}) | ||
} | ||
|
||
export const getTeacherById = (teacherId, date) => { | ||
if (!teacherId) { | ||
throw new RangeError('invalid teacherId') | ||
} | ||
|
||
return DonstuAPI({ | ||
url: `/Rasp?idTeacher=${teacherId}${date ? `&sdate=${date}` : ''}`, | ||
}) | ||
} | ||
|
||
export const getGroupById = (groupId, date) => { | ||
if (!groupId) { | ||
throw new RangeError('invalid groupId') | ||
} | ||
|
||
return DonstuAPI({ | ||
url: `/Rasp?idGroup=${groupId}${date ? `&sdate=${date}` : ''}`, | ||
}) | ||
} | ||
|
||
// export const fetchListYears = DonstuAPI({ | ||
// url: `/Rasp/ListYears`, | ||
// })export const fetchListYears = DonstuAPI({ | ||
// url: `/Rasp/ListYears`, | ||
// })export const fetchListYears = DonstuAPI({ | ||
// url: `/Rasp/ListYears`, | ||
// })export const fetchListYears = DonstuAPI({ | ||
// url: `/Rasp/ListYears`, | ||
// }) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export * from './instances' | ||
export * from './fetchers' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import axios from 'axios' | ||
|
||
export const DonstuAPI = axios.create({ | ||
crossDomain: true, | ||
timeout: 15000, | ||
baseURL: 'https://edu.donstu.ru/api', | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.