updated activationlink method. Now it is GET

This commit is contained in:
xfarrow
2024-03-04 12:26:06 +01:00
parent c1ba83d52e
commit 4cd0772dd7
3 changed files with 8 additions and 6 deletions

View File

@ -16,12 +16,13 @@ const knex = require('../utils/knex_config');
/**
* Get a Person's ID by its activation identifier
* @param {*} identifier
* @returns
* @returns The Person's ID associated with the identifier if present,
* null otherwise
*/
async function getPersonIdByIdentifier (identifier){
const tuple = await knex('ActivationLink')
.where('identifier', identifier)
.first();
.where('identifier', identifier)
.first();
if(tuple){
return tuple.person_id;
}