Rename GetAnimeList to GetUserAnime
This commit is contained in:
parent
507709ab00
commit
3a45726b3f
@ -1,4 +1,4 @@
|
|||||||
export const GetAnimeList = async (userID: number): Promise<Meikan.UserAnime[]> => {
|
export const GetUserAnime = async (userID: number): Promise<Meikan.UserAnime[]> => {
|
||||||
const res = await fetch(`https://api.meikan.moe/v1/users/${userID}/anime`)
|
const res = await fetch(`https://api.meikan.moe/v1/users/${userID}/anime`)
|
||||||
const anime: Meikan.UserAnime[] = await res.json()
|
const anime: Meikan.UserAnime[] = await res.json()
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { GetAnimeList } from '@/domain'
|
import { GetUserAnime } from '@/domain'
|
||||||
import { RootState } from '@/store'
|
import { RootState } from '@/store'
|
||||||
import { BareActionContext, getStoreBuilder } from 'vuex-typex'
|
import { BareActionContext, getStoreBuilder } from 'vuex-typex'
|
||||||
|
|
||||||
@ -23,7 +23,7 @@ function setAnime(state: UserAnimeState, animeList: Meikan.UserAnime[]) {
|
|||||||
|
|
||||||
// Action
|
// Action
|
||||||
async function fetchUserAnime(context: BareActionContext<UserAnimeState, RootState>, user: Meikan.User) {
|
async function fetchUserAnime(context: BareActionContext<UserAnimeState, RootState>, user: Meikan.User) {
|
||||||
const list = await GetAnimeList(user.id)
|
const list = await GetUserAnime(user.id)
|
||||||
|
|
||||||
userAnime.setAnime(list)
|
userAnime.setAnime(list)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user