@@ -406,15 +406,15 @@ async def get_permission(self, name):
406406
407407 :param name: Name of the permission
408408 """
409- return await self .get (f"custom_permission /{ name } " )
409+ return await self .get (f"permissions /{ name } " )
410410
411411 async def create_permission (self , permission ):
412412 """
413413 Create a custom permission
414414
415415 :param permission: Definition of the permission
416416 """
417- return await self .post ("custom_permission " , data = permission )
417+ return await self .post ("permissions " , data = permission )
418418
419419 async def update_permission (self , name , permission ):
420420 """
@@ -423,43 +423,43 @@ async def update_permission(self, name, permission):
423423 :param name: Name of the permission
424424 :param permission: New definition of the permission
425425 """
426- return await self .post (f"custom_permission /{ name } " , data = permission )
426+ return await self .put (f"permissions /{ name } " , data = permission )
427427
428428 async def delete_permission (self , name ):
429429 """
430430 Delete a custom permission
431431
432432 :param name: Name of the permission
433433 """
434- return await self .delete (f"custom_permission /{ name } " )
434+ return await self .delete (f"permissions /{ name } " )
435435
436436 async def list_permissions (self ):
437437 """
438- List custom permissions of the app
438+ List all permissions of the app
439439 """
440- return await self .get ("custom_permission " )
440+ return await self .get ("permissions " )
441441
442442 async def create_role (self , name ):
443443 """
444444 Create a custom role
445445
446446 :param name: Name of the role
447447 """
448- return await self .post ("custom_role " , data = {"name" : name })
448+ return await self .post ("roles " , data = {"name" : name })
449449
450450 async def delete_role (self , name ):
451451 """
452452 Delete a custom role
453453
454454 :param name: Name of the role
455455 """
456- return await self .delete (f"custom_role /{ name } " )
456+ return await self .delete (f"roles /{ name } " )
457457
458458 async def list_roles (self ):
459459 """
460- List custom roles of the app
460+ List all roles of the app
461461 """
462- return await self .get ("custom_role " )
462+ return await self .get ("roles " )
463463
464464 async def create_segment (self , segment ):
465465 """
0 commit comments