chore(stage-ui): resolve merge conflict
This commit is contained in:
@@ -80,7 +80,7 @@ describe('characterRoutes', () => {
|
||||
expect(res.status).toBe(201)
|
||||
const data = await res.json()
|
||||
expect(data.id).toBeDefined()
|
||||
|
||||
|
||||
const char = await characterService.findById(data.id)
|
||||
expect(char?.cover?.foregroundUrl).toBe('fg')
|
||||
})
|
||||
|
||||
@@ -111,38 +111,6 @@ export const useCharacterStore = defineStore('characters', () => {
|
||||
}, { immediate: true })
|
||||
}
|
||||
|
||||
async function like(id: string) {
|
||||
try {
|
||||
const res = await client.api.characters[':id'].like.$post({
|
||||
param: { id },
|
||||
})
|
||||
if (!res.ok)
|
||||
throw new Error('Failed to like character')
|
||||
|
||||
await fetchById(id)
|
||||
}
|
||||
catch (err) {
|
||||
error.value = err
|
||||
throw err
|
||||
}
|
||||
}
|
||||
|
||||
async function bookmark(id: string) {
|
||||
try {
|
||||
const res = await client.api.characters[':id'].bookmark.$post({
|
||||
param: { id },
|
||||
})
|
||||
if (!res.ok)
|
||||
throw new Error('Failed to bookmark character')
|
||||
|
||||
await fetchById(id)
|
||||
}
|
||||
catch (err) {
|
||||
error.value = err
|
||||
throw err
|
||||
}
|
||||
}
|
||||
|
||||
function getCharacter(id: string) {
|
||||
return characters.value.get(id)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user