dl-commons 0.0.2-testing.34 → 0.0.2-testing.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/models/interfaces/group-embedded.interface.d.ts +2 -0
- package/dist/services/groups.service.d.ts +2 -3
- package/dist/services/groups.service.js +2 -2
- package/dist/services/groups.service.js.map +1 -1
- package/dist/services/students.service.d.ts +1 -2
- package/dist/services/students.service.js +1 -1
- package/dist/services/students.service.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/models/interfaces/group-embedded.interface.ts +2 -0
- package/src/services/groups.service.ts +4 -4
- package/src/services/students.service.ts +2 -2
package/package.json
CHANGED
|
@@ -20,7 +20,7 @@ export class GroupsService {
|
|
|
20
20
|
//#endregion
|
|
21
21
|
|
|
22
22
|
//#region Public API
|
|
23
|
-
public async readGroup(id: string): Promise<
|
|
23
|
+
public async readGroup(id: string): Promise<IGroupEmbedded> {
|
|
24
24
|
try {
|
|
25
25
|
const endpoint = `${this._baseUrl}/v1/groups/${id}`;
|
|
26
26
|
const response$ = this._httpService.get<RESTResponseBody<IGroupEmbedded>>(endpoint);
|
|
@@ -34,13 +34,13 @@ export class GroupsService {
|
|
|
34
34
|
throw new RESTError('students_api_error', 'empty response');
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
return response.data.result;
|
|
37
|
+
return response.data.result.data;
|
|
38
38
|
} catch (e) {
|
|
39
39
|
throw RESTError.createFromCatch(e, { keyword: 'unknown', debug: e });
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
-
public async readGroupRequest(id: string): Promise<
|
|
43
|
+
public async readGroupRequest(id: string): Promise<IGroupRequestEmbedded> {
|
|
44
44
|
try {
|
|
45
45
|
const endpoint = `${this._baseUrl}/v1/group-requests/${id}`;
|
|
46
46
|
const response$ = this._httpService.get<RESTResponseBody<IGroupRequestEmbedded>>(endpoint);
|
|
@@ -54,7 +54,7 @@ export class GroupsService {
|
|
|
54
54
|
throw new RESTError('students_api_error', 'empty response');
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
-
return response.data.result;
|
|
57
|
+
return response.data.result.data;
|
|
58
58
|
} catch (e) {
|
|
59
59
|
throw RESTError.createFromCatch(e, { keyword: 'unknown', debug: e });
|
|
60
60
|
}
|
|
@@ -19,7 +19,7 @@ export class StudentsService {
|
|
|
19
19
|
//#endregion
|
|
20
20
|
|
|
21
21
|
//#region Public API
|
|
22
|
-
public async read(id: string): Promise<
|
|
22
|
+
public async read(id: string): Promise<IStudentEmbedded> {
|
|
23
23
|
try {
|
|
24
24
|
const endpoint = `${this._baseUrl}/v1/students/${id}`;
|
|
25
25
|
const response$ = this._httpService.get<RESTResponseBody<IStudentEmbedded>>(endpoint);
|
|
@@ -33,7 +33,7 @@ export class StudentsService {
|
|
|
33
33
|
throw new RESTError('students_api_error', 'empty response');
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
return response.data.result;
|
|
36
|
+
return response.data.result.data;
|
|
37
37
|
} catch (e) {
|
|
38
38
|
throw RESTError.createFromCatch(e, { keyword: 'unknown', debug: e });
|
|
39
39
|
}
|