mirror of
https://github.com/tornadocash/trusted-setup-server.git
synced 2024-12-22 17:23:18 +01:00
contribution fix
-add destroy session
This commit is contained in:
parent
29387ac20c
commit
aa8d72923c
@ -63,4 +63,8 @@ router.get('/twitter_callback', (req, res) => {
|
||||
)
|
||||
})
|
||||
|
||||
router.get('/logout', (req, res) => {
|
||||
req.session.destroy()
|
||||
})
|
||||
|
||||
module.exports = router
|
||||
|
@ -13,8 +13,9 @@ module.exports = (sequelize, DataTypes) => {
|
||||
{
|
||||
hooks: {
|
||||
beforeCreate: (contribution, options) => {
|
||||
const { name, company } = contribution.dataValues
|
||||
if (name.length < 4 || name.length > 35) {
|
||||
console.log('contribution', contribution.dataValues)
|
||||
const { name, company, socialType } = contribution.dataValues
|
||||
if (socialType !== 'anonymous' && (name.length < 4 || name.length > 35)) {
|
||||
throw new Error('Wrong name')
|
||||
}
|
||||
if (company && company.length > 35) {
|
||||
|
Loading…
Reference in New Issue
Block a user