16067: Ignores certain fields on create & update api calls.
[arvados-workbench2.git] / src / services / common-service / common-service.ts
index d81178212711a7e7634e5493b7e516793d158aa2..44233eb17bd2f683ecf4fcb48459160dd583119e 100644 (file)
@@ -36,11 +36,13 @@ export class CommonService<T> {
     protected serverApi: AxiosInstance;
     protected resourceType: string;
     protected actions: ApiActions;
+    protected readOnlyFields: string[];
 
-    constructor(serverApi: AxiosInstance, resourceType: string, actions: ApiActions) {
+    constructor(serverApi: AxiosInstance, resourceType: string, actions: ApiActions, readOnlyFields: string[] = []) {
         this.serverApi = serverApi;
         this.resourceType = '/' + resourceType;
         this.actions = actions;
+        this.readOnlyFields = readOnlyFields;
     }
 
     static mapResponseKeys = (response: { data: any }) =>