Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

[45875] Set _type to fixed string for IStorageFiles

Andreas Pfohl2abcd6c14584
diff --git a/frontend/src/app/core/state/storage-files/storage-files.model.ts b/frontend/src/app/core/state/storage-files/storage-files.model.ts
index 2a360e9ab41..ecb0fdb2235 100644
--- a/frontend/src/app/core/state/storage-files/storage-files.model.ts
+++ b/frontend/src/app/core/state/storage-files/storage-files.model.ts
@@ -32,6 +32,6 @@ import { IStorageFile } from 'core-app/core/state/storage-files/storage-file.mod
export interface IStorageFiles {
files:IStorageFile[];
parent:IStorageFile;
- _type:string;
+ _type:'StorageFiles';
_links:IHalResourceLinks;
}
diff --git a/frontend/src/app/core/state/storage-files/storage-files.service.ts b/frontend/src/app/core/state/storage-files/storage-files.service.ts
index a2b2dfb2602..b741ec1e820 100644
--- a/frontend/src/app/core/state/storage-files/storage-files.service.ts
+++ b/frontend/src/app/core/state/storage-files/storage-files.service.ts
@@ -55,8 +55,8 @@ export class StorageFilesResourceService {
if (value !== undefined) {
return combineLatest([this.lookupMany(value.files), this.lookup(value.parent)])
.pipe(
- map(([files, parent]) => ({
- files, parent, _type: 'storage_file', _links: { self: link },
+ map(([files, parent]):IStorageFiles => ({
+ files, parent, _type: 'StorageFiles', _links: { self: link },
})),
take(1),
);