Implement auth with jwt and add endpoints
This commit is contained in:
@@ -6,6 +6,7 @@ module.exports = {
|
||||
updateAccount,
|
||||
deleteAccount,
|
||||
getMeetingsByAccountId,
|
||||
getAccountByEmail,
|
||||
};
|
||||
|
||||
function addAccount(data) {
|
||||
@@ -67,3 +68,18 @@ function getAccountById(id) {
|
||||
'latest_time',
|
||||
);
|
||||
}
|
||||
|
||||
function getAccountByEmail(email) {
|
||||
return db('account')
|
||||
.where({ email })
|
||||
.first()
|
||||
.select(
|
||||
'id',
|
||||
'username',
|
||||
'password',
|
||||
'email',
|
||||
'timezone',
|
||||
'earliest_time',
|
||||
'latest_time',
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user