import { Injectable } from '@angular/core';
import { Post, requestDone } from '../http.decorators';
import { _BaseApi } from './_base';

@Injectable({ providedIn: 'root' })
export class AuthApi extends _BaseApi {
  @Post('/user/login')
  async login(data: Auth.LoginParams): Promise<Auth.LoginResponse> {
    requestDone(data);
  }

  @Post('/auth/logout')
  async logout(): Promise<void> {
    requestDone();
  }
}
