remove unused method

This commit is contained in:
Mads Rasmussen
2022-08-29 13:34:02 +02:00
parent 2dafac472b
commit 236f41f324

View File

@@ -5,20 +5,6 @@ export class UmbDataTypeStore {
private _dataTypes: BehaviorSubject<Array<DataTypeEntity>> = new BehaviorSubject(<Array<DataTypeEntity>>[]);
public readonly dataTypes: Observable<Array<DataTypeEntity>> = this._dataTypes.asObservable();
getById(id: number): Observable<DataTypeEntity | null> {
// TODO: use Fetcher API.
// TODO: only fetch if the data type is not in the store?
fetch(`/umbraco/backoffice/data-type/${id}`)
.then((res) => res.json())
.then((data) => {
this._updateStore(data);
});
return this.dataTypes.pipe(
map((dataTypes: Array<DataTypeEntity>) => dataTypes.find((node: DataTypeEntity) => node.id === id) || null)
);
}
getByKey(key: string): Observable<DataTypeEntity | null> {
// TODO: use Fetcher API.
// TODO: only fetch if the data type is not in the store?