minor fixes & refactoring

This commit is contained in:
Henry Jameson 2026-01-27 22:58:20 +02:00
commit ed9e9a3877
9 changed files with 286 additions and 294 deletions

View file

@ -551,7 +551,7 @@ const users = {
},
registerPushNotifications(store) {
const token = store.state.currentUser.credentials
const vapidPublicKey = store.rootState.instance.vapidPublicKey
const vapidPublicKey = useInstanceStore().vapidPublicKey
const isEnabled = store.rootState.config.webPushNotifications
const notificationVisibility =
store.rootState.config.notificationVisibility
@ -648,7 +648,6 @@ const users = {
logout(store) {
const oauth = useOAuthStore()
const { instance } = store.rootState
// NOTE: No need to verify the app still exists, because if it doesn't,
// the token will be invalid too
@ -657,7 +656,7 @@ const users = {
.then((app) => {
const params = {
app,
instance: instance.server,
instance: useInstanceStore().server,
token: oauth.userToken,
}