Set showAfter to 0 for immediately recurring requests (#26)
This commit is contained in:
@@ -52,7 +52,7 @@ export default {
|
||||
this.$auth.logout(this.$store, this.$router)
|
||||
},
|
||||
showHelp () {
|
||||
window.open('https://docs.prayerjournal.me','_blank')
|
||||
window.open('https://docs.prayerjournal.me', '_blank')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -76,7 +76,7 @@ export default {
|
||||
await this.$store.dispatch(actions.SHOW_REQUEST_NOW, {
|
||||
progress: this.progress,
|
||||
requestId: this.request.requestId,
|
||||
showAfter: Date.now()
|
||||
showAfter: 0
|
||||
})
|
||||
this.messages.$emit('info', 'Recurrence skipped; request now shows in journal')
|
||||
this.$parent.$emit('requestNowShown')
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
'use strict'
|
||||
|
||||
/* eslint-disable */
|
||||
/* eslint-disable no-multi-spaces */
|
||||
import Vue from 'vue'
|
||||
import Vuex from 'vuex'
|
||||
|
||||
@@ -9,10 +9,11 @@ import auth from '@/auth/AuthService'
|
||||
|
||||
import mutations from './mutation-types'
|
||||
import actions from './action-types'
|
||||
/* eslint-enable */
|
||||
/* eslint-enable no-multi-spaces */
|
||||
|
||||
Vue.use(Vuex)
|
||||
|
||||
/* eslint-disable no-console */
|
||||
const logError = function (error) {
|
||||
if (error.response) {
|
||||
// The request was made and the server responded with a status code
|
||||
@@ -39,7 +40,7 @@ const setBearer = async function () {
|
||||
try {
|
||||
await auth.getAccessToken()
|
||||
api.setBearer(auth.session.id.token)
|
||||
} catch(err) {
|
||||
} catch (err) {
|
||||
if (err === 'Not logged in') {
|
||||
console.warn('API request attempted when user was not logged in')
|
||||
} else {
|
||||
@@ -47,6 +48,7 @@ const setBearer = async function () {
|
||||
}
|
||||
}
|
||||
}
|
||||
/* eslint-enable no-console */
|
||||
|
||||
export default new Vuex.Store({
|
||||
state: {
|
||||
@@ -100,7 +102,7 @@ export default new Vuex.Store({
|
||||
try {
|
||||
await auth.getAccessToken()
|
||||
commit(mutations.SET_AUTHENTICATION, auth.isAuthenticated())
|
||||
} catch(_) {
|
||||
} catch (_) {
|
||||
commit(mutations.SET_AUTHENTICATION, false)
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user