Merge pull request #1651 from umbraco/chore/remove-config-repo

Chore: Removes `UmbConfigRepository`
This commit is contained in:
Lee Kelleher
2024-04-18 14:11:20 +01:00
committed by GitHub

View File

@@ -1,18 +0,0 @@
import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api';
import type { ServertimeOffset } from '@umbraco-cms/backoffice/models';
import { tryExecuteAndNotify } from '@umbraco-cms/backoffice/resources';
import { umbracoPath } from '@umbraco-cms/backoffice/utils';
export class UmbConfigRepository {
#host;
constructor(host: UmbControllerHost) {
this.#host = host;
}
async getServertimeOffset() {
const resource = fetch(umbracoPath('/config/servertimeoffset')).then((res) => res.json());
const { data } = await tryExecuteAndNotify<ServertimeOffset>(this.#host, resource);
return data;
}
}