AuthorManager: prevent generation of an author in case no token was specified
parent
32806c31fd
commit
dbfe5cadf4
|
@ -107,6 +107,10 @@ exports.doesAuthorExists = exports.doesAuthorExist;
|
|||
* @param {String} token The token
|
||||
*/
|
||||
exports.getAuthor4Token = async (token) => {
|
||||
// e.g. in case of an export of a public pad, a token is not needed
|
||||
if (token == null) {
|
||||
return;
|
||||
}
|
||||
const author = await mapAuthorWithDBKey('token2author', token);
|
||||
|
||||
// return only the sub value authorID
|
||||
|
|
Loading…
Reference in New Issue