mirror of
https://github.com/gotson/komga.git
synced 2025-12-20 07:23:34 +01:00
fix(webui): catch exception during authentication activity retrieval
This commit is contained in:
parent
59c187f3b7
commit
e4b136b28d
1 changed files with 9 additions and 5 deletions
|
|
@ -32,6 +32,7 @@
|
|||
|
||||
<script lang="ts">
|
||||
import Vue from 'vue'
|
||||
import {ERROR} from '@/types/events'
|
||||
|
||||
export default Vue.extend({
|
||||
name: 'AuthenticationActivityTable',
|
||||
|
|
@ -91,11 +92,14 @@ export default Vue.extend({
|
|||
}
|
||||
|
||||
let itemsPage
|
||||
if (!this.forMe) itemsPage = await this.$komgaUsers.getAuthenticationActivity(pageRequest)
|
||||
else itemsPage = await this.$komgaUsers.getMyAuthenticationActivity(pageRequest)
|
||||
|
||||
this.totalItems = itemsPage.totalElements
|
||||
this.items = itemsPage.content
|
||||
try {
|
||||
if (!this.forMe) itemsPage = await this.$komgaUsers.getAuthenticationActivity(pageRequest)
|
||||
else itemsPage = await this.$komgaUsers.getMyAuthenticationActivity(pageRequest)
|
||||
this.totalItems = itemsPage.totalElements
|
||||
this.items = itemsPage.content
|
||||
} catch (e) {
|
||||
this.$eventHub.$emit(ERROR, {message: e.message} as ErrorEvent)
|
||||
}
|
||||
|
||||
this.loading = false
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in a new issue