pis #12
@ -5,7 +5,7 @@ const mail = require('../services/mail.services')
|
|||||||
const clean = require('../utils/sanitizer.utils')
|
const clean = require('../utils/sanitizer.utils')
|
||||||
const domList= require('../configs/domains.configs')
|
const domList= require('../configs/domains.configs')
|
||||||
|
|
||||||
async function createRegKey(eml){
|
async function createRegKey(eml){ // Needs moving to register.services
|
||||||
const domain = clean.splitDomain(eml)
|
const domain = clean.splitDomain(eml)
|
||||||
if (domain in domList.valid) { // Don't know if this is correct
|
if (domain in domList.valid) { // Don't know if this is correct
|
||||||
const uuid = util.generateKey();
|
const uuid = util.generateKey();
|
||||||
|
@ -15,7 +15,7 @@ async function isAuthed(key) { // Needs testing
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Creates an API key for a user
|
// Creates an API key for a user
|
||||||
async function generateKey() { // Needs testing
|
async function generateKey() { // Needs testing & moving to 'register.utils'
|
||||||
return crypto.randomUUID()
|
return crypto.randomUUID()
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user