Commit 4fbea185 authored by Chunchi Che's avatar Chunchi Che

update fetch cards api

parent 8afb47b7
Pipeline #18111 passed with stages
in 3 minutes and 1 second
...@@ -5,7 +5,7 @@ export interface CardMeta { ...@@ -5,7 +5,7 @@ export interface CardMeta {
data: { data: {
ot?: number; ot?: number;
setcode?: number; setcode?: number;
type?: number; type_?: number;
atk?: number; atk?: number;
def?: number; def?: number;
level?: number; level?: number;
...@@ -27,7 +27,7 @@ export interface CardMeta { ...@@ -27,7 +27,7 @@ export interface CardMeta {
* *
* */ * */
export async function fetchCard(id: number): Promise<CardMeta> { export async function fetchCard(id: number): Promise<CardMeta> {
const res = await axios.get<CardMeta>("https://ygocdb.com/api/v0/card/" + id); const res = await axios.get<CardMeta>("http://localhost:3030/cards/" + id);
return res.data; return res.data;
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment