Skip to content

Commit

Permalink
Merge pull request #553 from AudiovisualMetadataPlatform/AMP-3546_units
Browse files Browse the repository at this point in the history
AMP-3546:
  • Loading branch information
yingfeng-iu authored Dec 14, 2024
2 parents fd69e59 + d25759e commit 9fc28d6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/service/unit-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}

/***
Expand Down

0 comments on commit 9fc28d6

Please sign in to comment.