Remove specs + eslind on front
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import { HttpClient, HttpErrorResponse, HttpHeaders } from '@angular/common/http';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { MatSnackBar } from '@angular/material/snack-bar';
|
||||
import { environment } from 'src/environments/environment';
|
||||
import { User } from '../models/user.model';
|
||||
|
||||
@@ -18,7 +17,7 @@ export class AuthService {
|
||||
|
||||
ping() {
|
||||
return new Promise((resolve, reject) => {
|
||||
this.http$.get<any>(`${environment.api.url}/ping/ping`).subscribe({
|
||||
this.http$.get<string>(`${environment.api.url}/ping/ping`).subscribe({
|
||||
next: (data) => {
|
||||
resolve(data);
|
||||
},
|
||||
@@ -34,6 +33,7 @@ export class AuthService {
|
||||
getAPIToken(credentials: string): Promise<void> {
|
||||
return new Promise((resolve, reject) => {
|
||||
const header = new HttpHeaders().set('Content-type', 'application/json');
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
this.http$.post<any>(`${environment.api.url}/auth/apiToken`, JSON.stringify(credentials), { headers: header }).subscribe({
|
||||
next: (data) => {
|
||||
this.user.id = data.id;
|
||||
|
||||
Reference in New Issue
Block a user