small naming improvments
This commit is contained in:
parent
3b71faa3e7
commit
3327b6a1ee
3 changed files with 6 additions and 9 deletions
|
|
@ -8,7 +8,7 @@ const AppInviteCreated = sequelize.define('AppInviteCreated', {
|
|||
unique: true,
|
||||
primaryKey: true
|
||||
},
|
||||
inviter_npub: {
|
||||
inviter_pub_key: {
|
||||
type: DataTypes.STRING,
|
||||
allowNull: false,
|
||||
},
|
||||
|
|
|
|||
|
|
@ -5,10 +5,7 @@ const AppInviteCreated = require('../models/AppInviteCreated');
|
|||
const SignUpChallengeCreated = require('../models/SignUpChallengeCreated');
|
||||
const SignUpChallengeCompleted = require('../models/SignUpChallengeCompleted');
|
||||
|
||||
|
||||
const errors = require('../errors');
|
||||
const NostrChallengeCompleted = require('../models/NostrChallengeCompleted');
|
||||
const { sortEvents } = require('nostr-tools');
|
||||
|
||||
async function appInviteExists(inviteUuid) {
|
||||
const invite = await AppInviteCreated.findOne({ where: { uuid: inviteUuid } });
|
||||
|
|
@ -36,10 +33,10 @@ async function isAppInviteSpent(appInviteUuid) {
|
|||
return false;
|
||||
}
|
||||
|
||||
async function createAppInvite(inviterNpub) {
|
||||
async function createAppInvite(inviterPubKey) {
|
||||
return await AppInviteCreated.create({
|
||||
uuid: uuid.v7(),
|
||||
inviter_npub: inviterNpub,
|
||||
inviter_pub_key: inviterPubKey,
|
||||
created_at: new Date().toISOString()
|
||||
}
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue