ghostfolio/apps/client/src/app/services/admin.service.ts

32 lines
674 B
TypeScript
Raw Normal View History

2021-04-13 21:53:58 +02:00
import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { DataSource } from '@prisma/client';
2021-04-13 21:53:58 +02:00
@Injectable({
providedIn: 'root'
})
export class AdminService {
public constructor(private http: HttpClient) {}
public gatherMax() {
return this.http.post<void>(`/api/admin/gather/max`, {});
}
public gatherProfileData() {
return this.http.post<void>(`/api/admin/gather/profile-data`, {});
}
public gatherSymbol({
dataSource,
symbol
}: {
dataSource: DataSource;
symbol: string;
}) {
return this.http.post<void>(
`/api/admin/gather/${dataSource}/${symbol}`,
{}
);
}
2021-04-13 21:53:58 +02:00
}