mirror of
https://framagit.org/framasoft/framadate/funky-framadate-front.git
synced 2023-08-25 13:53:14 +02:00
remove loader service to fix api calls
This commit is contained in:
parent
597bde003f
commit
e66ca4448b
@ -96,13 +96,12 @@ export class ApiService {
|
||||
console.log('Error', error.message);
|
||||
}
|
||||
console.log(error.config);
|
||||
this.loaderService.setStatus(false);
|
||||
// this.loaderService.setStatus(false);
|
||||
}
|
||||
|
||||
public async createPoll(poll: Poll): Promise<Subscription> {
|
||||
// this.loaderService.setStatus(true);
|
||||
console.log('createPoll config', poll);
|
||||
this.loaderService.setStatus(true);
|
||||
return this.axiosInstance.post(
|
||||
`${this.baseHref}${currentApiRoutes['api_new_poll']}`,
|
||||
poll,
|
||||
@ -295,17 +294,18 @@ export class ApiService {
|
||||
ApiService.handleError(error);
|
||||
}
|
||||
}
|
||||
|
||||
/////////////////////
|
||||
// PRIVATE METHODS //
|
||||
/////////////////////
|
||||
|
||||
public async sendEmailToUserOfItsPollsList(email: string): Promise<void> {
|
||||
if (this.loaderService.isLoading) {
|
||||
return;
|
||||
}
|
||||
// if (this.loaderService.isLoading) {
|
||||
// return;
|
||||
// }
|
||||
// If user is not authenticated: the list of polls is send to user's email by the backend.
|
||||
try {
|
||||
this.loaderService.setStatus(false);
|
||||
// this.loaderService.setStatus(false);
|
||||
await this.axiosInstance.get<Poll[]>(
|
||||
`${this.usersEndpoint}/${email}${this.usersPollsEndpoint}${this.usersPollsSendEmailEndpoint}`
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user