You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
450 B
14 lines
450 B
import { UserPreferencesDTO } from 'app/types';
|
|
import { backendSrv } from './backend_srv';
|
|
|
|
export class PreferencesService {
|
|
constructor(private resourceUri: string) {}
|
|
|
|
update(preferences: UserPreferencesDTO): Promise<any> {
|
|
return backendSrv.put(`/api/${this.resourceUri}/preferences`, preferences);
|
|
}
|
|
|
|
load(): Promise<UserPreferencesDTO> {
|
|
return backendSrv.get<UserPreferencesDTO>(`/api/${this.resourceUri}/preferences`);
|
|
}
|
|
}
|
|
|