datasurvey/src/main/webapp/app/account/activate/activate.service.ts

17 lines
590 B
TypeScript

import { Injectable } from '@angular/core';
import { HttpClient, HttpParams } from '@angular/common/http';
import { Observable } from 'rxjs';
import { ApplicationConfigService } from 'app/core/config/application-config.service';
@Injectable({ providedIn: 'root' })
export class ActivateService {
constructor(private http: HttpClient, private applicationConfigService: ApplicationConfigService) {}
get(key: string): Observable<{}> {
return this.http.get(this.applicationConfigService.getEndpointFor('api/activate'), {
params: new HttpParams().set('key', key),
});
}
}