From d25759e1bf6c07eaf167fe0eca5257a6424a0b73 Mon Sep 17 00:00:00 2001 From: yingfeng Date: Fri, 13 Dec 2024 21:03:37 -0500 Subject: [PATCH] AMP-3546: - update API URL for listing units --- src/service/unit-service.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/service/unit-service.js b/src/service/unit-service.js index 585b0993..92511620 100644 --- a/src/service/unit-service.js +++ b/src/service/unit-service.js @@ -5,15 +5,15 @@ const baseService = new BaseService(); export default class UnitService extends BaseService{ /*** - * To get the list of all units. + * To get the list of all units accessible to current user. * @params num, size */ async getAllUnits(num,size){ if(num && size){ - return super.get_auth(`/units?page=${num}&size=${size}`) + return super.get_auth(`/permissions/units?actionType=Read&targetType=Unit&page=${num}&size=${size}`) } - else return super.get_auth('/units'); + else return super.get_auth('/permissions/units?actionType=Read&targetType=Unit'); } /***