mirror of
https://github.com/anatolykopyl/vk-bingo.git
synced 2026-03-26 12:54:25 +00:00
🩹 Избавился от ошибки сервера, когда пользователь не вводит пароль
This commit is contained in:
@@ -42,7 +42,7 @@ app.post('/auth', async (req, res) => {
|
|||||||
} else {
|
} else {
|
||||||
try {
|
try {
|
||||||
const pass = req.body.pass
|
const pass = req.body.pass
|
||||||
if (pass.toLowerCase() === process.env.PASSWORD) {
|
if (pass && pass.toLowerCase() === process.env.PASSWORD) {
|
||||||
req.session.loggedIn = true
|
req.session.loggedIn = true
|
||||||
res.status(200).send("Logged in")
|
res.status(200).send("Logged in")
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -13,6 +13,9 @@
|
|||||||
</transition>
|
</transition>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div v-else>
|
||||||
|
Загрузка...
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@@ -42,10 +45,13 @@ export default {
|
|||||||
this.showResult = false
|
this.showResult = false
|
||||||
axios
|
axios
|
||||||
.get(process.env.VUE_APP_BACKEND + '/card')
|
.get(process.env.VUE_APP_BACKEND + '/card')
|
||||||
.then(response => (this.card = response.data))
|
.then(response => {
|
||||||
|
this.card = response.data
|
||||||
|
})
|
||||||
},
|
},
|
||||||
nextCard: function() {
|
nextCard: function() {
|
||||||
if (this.showResult) {
|
if (this.showResult) {
|
||||||
|
this.card = null
|
||||||
this.getCard()
|
this.getCard()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user