mirror of
https://codeberg.org/keyoxide/keyoxide-web.git
synced 2024-12-22 23:09:29 -07:00
Use auto profile generation
This commit is contained in:
parent
7b35f99b1c
commit
42210c6ac0
2 changed files with 4 additions and 12 deletions
|
@ -30,7 +30,7 @@ more information on this, and how to apply and follow the GNU AGPL, see <https:/
|
||||||
import express from 'express'
|
import express from 'express'
|
||||||
import { check, validationResult } from 'express-validator'
|
import { check, validationResult } from 'express-validator'
|
||||||
import Ajv from 'ajv'
|
import Ajv from 'ajv'
|
||||||
import { generateWKDProfile, generateHKPProfile } from '../../server/index.js'
|
import { generateWKDProfile, generateHKPProfile, generateAutoProfile } from '../../server/index.js'
|
||||||
import * as dotenv from 'dotenv'
|
import * as dotenv from 'dotenv'
|
||||||
dotenv.config()
|
dotenv.config()
|
||||||
|
|
||||||
|
@ -310,11 +310,7 @@ router.get('/profile/fetch',
|
||||||
data = await generateHKPProfile(req.query.query)
|
data = await generateHKPProfile(req.query.query)
|
||||||
break
|
break
|
||||||
default:
|
default:
|
||||||
if (req.query.query.includes('@')) {
|
data = await generateAutoProfile(req.query.query)
|
||||||
data = await generateWKDProfile(req.query.query)
|
|
||||||
} else {
|
|
||||||
data = await generateHKPProfile(req.query.query)
|
|
||||||
}
|
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,7 @@ more information on this, and how to apply and follow the GNU AGPL, see <https:/
|
||||||
import express from 'express'
|
import express from 'express'
|
||||||
import { check, validationResult } from 'express-validator'
|
import { check, validationResult } from 'express-validator'
|
||||||
import Ajv from 'ajv'
|
import Ajv from 'ajv'
|
||||||
import { generateWKDProfile, generateHKPProfile } from '../../server/index.js'
|
import { generateWKDProfile, generateHKPProfile, generateAutoProfile } from '../../server/index.js'
|
||||||
import * as dotenv from 'dotenv'
|
import * as dotenv from 'dotenv'
|
||||||
dotenv.config()
|
dotenv.config()
|
||||||
|
|
||||||
|
@ -283,11 +283,7 @@ router.get('/fetch',
|
||||||
data = await generateHKPProfile(req.query.query)
|
data = await generateHKPProfile(req.query.query)
|
||||||
break
|
break
|
||||||
default:
|
default:
|
||||||
if (req.query.query.includes('@')) {
|
data = await generateAutoProfile(req.query.query)
|
||||||
data = await generateWKDProfile(req.query.query)
|
|
||||||
} else {
|
|
||||||
data = await generateHKPProfile(req.query.query)
|
|
||||||
}
|
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue