Commit baefa3b7 authored by Christopher Fullarton's avatar Christopher Fullarton

Provides the quizname in the url when requesting a free member group

parent f4be1d6f
Pipeline #33629 passed with stages
in 15 minutes and 31 seconds
......@@ -46,7 +46,7 @@ export class MemberGroupSelectComponent {
}
if (this.quizService.quiz.sessionConfig.nicks.autoJoinToGroup) {
this.quizApiService.getFreeMemberGroup().subscribe((data: IMessage) => {
this.quizApiService.getFreeMemberGroup(this.quizService.quiz.name).subscribe((data: IMessage) => {
if (data.status === StatusProtocol.Success && data.step === MessageProtocol.GetFreeMemberGroup) {
this.addToGroup(data.payload.groupName);
}
......
......@@ -53,7 +53,7 @@ describe('QuizApiService', () => {
},
};
service.getFreeMemberGroup().subscribe();
service.getFreeMemberGroup(quizName).subscribe();
backend.expectOne(service.getFreeMemberGroupUrl).flush(quizStatusData);
expect(service).toBeTruthy();
......
......@@ -148,8 +148,8 @@ export class QuizApiService {
{ headers: { authorization: sessionStorage.getItem(StorageKey.QuizToken) || sessionStorage.getItem(StorageKey.PrivateKey) } });
}
public getFreeMemberGroup(): Observable<IMessage> {
return this.http.get<IMessage>(`${this._getFreeMemberGroupUrl}`,
public getFreeMemberGroup(quizName: string): Observable<IMessage> {
return this.http.get<IMessage>(`${this._getFreeMemberGroupUrl}/${quizName}`,
{ headers: { authorization: sessionStorage.getItem(StorageKey.QuizToken) || sessionStorage.getItem(StorageKey.PrivateKey) } });
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment