mycontrolpanel/src/app/api/services/google.service.ts
2019-07-11 23:10:35 +02:00

63 lines
1.6 KiB
TypeScript

/* tslint:disable */
import { Injectable } from '@angular/core';
import { HttpClient, HttpRequest, HttpResponse, HttpHeaders } from '@angular/common/http';
import { BaseService as __BaseService } from '../base-service';
import { ApiConfiguration as __Configuration } from '../api-configuration';
import { StrictHttpResponse as __StrictHttpResponse } from '../strict-http-response';
import { Observable as __Observable } from 'rxjs';
import { map as __map, filter as __filter } from 'rxjs/operators';
import { GoogleAuthModel } from '../models/google-auth-model';
@Injectable({
providedIn: 'root',
})
class GoogleService extends __BaseService {
static readonly CreatePath = '/google';
constructor(
config: __Configuration,
http: HttpClient
) {
super(config, http);
}
/**
* @param user undefined
*/
CreateResponse(user?: GoogleAuthModel): __Observable<__StrictHttpResponse<null>> {
let __params = this.newParams();
let __headers = new HttpHeaders();
let __body: any = null;
__body = user;
let req = new HttpRequest<any>(
'POST',
this.rootUrl + `/google`,
__body,
{
headers: __headers,
params: __params,
responseType: 'json'
});
return this.http.request<any>(req).pipe(
__filter(_r => _r instanceof HttpResponse),
__map((_r) => {
return _r as __StrictHttpResponse<null>;
})
);
}
/**
* @param user undefined
*/
Create(user?: GoogleAuthModel): __Observable<null> {
return this.CreateResponse(user).pipe(
__map(_r => _r.body as null)
);
}
}
module GoogleService {
}
export { GoogleService }