feat: admin auth UI + fetch

This commit is contained in:
NGPixel
2018-06-04 00:41:29 -04:00
parent dd318eb2db
commit 5efbfc7370
10 changed files with 2457 additions and 3615 deletions

View File

@@ -15,7 +15,7 @@ module.exports = {
async authentication() { return {} }
},
AuthenticationQuery: {
async providers(obj, args, context, info) {
async strategies(obj, args, context, info) {
let strategies = await WIKI.db.authentication.query().orderBy('title')
strategies = strategies.map(stg => ({
...stg,
@@ -52,7 +52,7 @@ module.exports = {
}
}
},
AuthenticationProvider: {
AuthenticationStrategy: {
icon (ap, args) {
return fs.readFile(path.join(WIKI.ROOTPATH, `assets/svg/auth-icon-${ap.key}.svg`), 'utf8').catch(err => {
if (err.code === 'ENOENT') {