refactor: rewrite useSamlAuthProvider with RQ

This commit is contained in:
Rıdvan Akca
2024-03-15 15:50:24 +03:00
parent e381f95b95
commit b578e73cc4
7 changed files with 31 additions and 59 deletions

View File

@@ -1,14 +0,0 @@
import SamlAuthProvider from '../../models/saml-auth-provider.ee.js';
const getSamlAuthProvider = async (_parent, params, context) => {
context.currentUser.can('read', 'SamlAuthProvider');
const samlAuthProvider = await SamlAuthProvider.query()
.limit(1)
.first()
.throwIfNotFound();
return samlAuthProvider;
};
export default getSamlAuthProvider;