feat: Convert all query files to JS

This commit is contained in:
Faruk AYDIN
2023-12-28 13:39:31 +01:00
parent cd91f8c711
commit cbbb76a6c5
39 changed files with 151 additions and 342 deletions

View File

@@ -0,0 +1,17 @@
import SamlAuthProvider from '../../models/saml-auth-provider.ee';
const getSamlAuthProviderRoleMappings = async (_parent, params, context) => {
context.currentUser.can('read', 'SamlAuthProvider');
const samlAuthProvider = await SamlAuthProvider.query()
.findById(params.id)
.throwIfNotFound();
const roleMappings = await samlAuthProvider
.$relatedQuery('samlAuthProvidersRoleMappings')
.orderBy('remote_role_name', 'asc');
return roleMappings;
};
export default getSamlAuthProviderRoleMappings;