feat(authorization): add delete connection checks

This commit is contained in:
Ali BARIN
2023-07-18 21:06:04 +00:00
parent 94e560c262
commit 181cb5f335
@@ -11,6 +11,8 @@ const deleteConnection = async (
params: Params, params: Params,
context: Context context: Context
) => { ) => {
context.currentUser.can('delete', 'Connection');
await context.currentUser await context.currentUser
.$relatedQuery('connections') .$relatedQuery('connections')
.delete() .delete()