Skip to content

Commit

Permalink
Update idnLives.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
crstlnz committed Jan 9, 2024
1 parent 6a14e4e commit 3e64cf9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion store/idnLives.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export const useIDNLives = defineStore('useIDNLives', () => {
async function getIDNLives(): Promise<IDNLives[]> {
if (!members.value) members.value = await getMembers().catch(_ => [])
const idnUsernames: string[] = members.value?.filter(i => i.idn_username).map(i => i.idn_username) as string[] || []
if (idnUsernames?.length !== 41) {
if (idnUsernames?.length) {
return await $apiFetch<IDNLives[]>(`/api/idn_lives`).catch((_) => {
addNotif({
type: 'danger',
Expand Down Expand Up @@ -82,6 +82,8 @@ export const useIDNLives = defineStore('useIDNLives', () => {
}
})

const additionalUsername = ['jkt48-official']
idnUsernames.push(...additionalUsername)
const config = useRuntimeConfig()
const filtered = data.filter(i => idnUsernames.includes(i.user.username))
if (config.public.isDev && !filtered.length) {
Expand Down

1 comment on commit 3e64cf9

@vercel
Copy link

@vercel vercel bot commented on 3e64cf9 Jan 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.