complete award page - score - transactions not complete
This commit is contained in:
@@ -1,17 +1,6 @@
|
||||
import { AwardsResponse } from "../../types";
|
||||
import axiosInstance from "../axios";
|
||||
|
||||
|
||||
export interface AwardsResponse {
|
||||
_id: string,
|
||||
score: number,
|
||||
title: string,
|
||||
desc: string,
|
||||
expireDate: string,
|
||||
created_at: string,
|
||||
updated_at: string,
|
||||
__v: number,
|
||||
id: string
|
||||
}
|
||||
|
||||
export const getAwardsList = () => axiosInstance.get<AwardsResponse[] | AwardsResponse | []>("/gps/award")
|
||||
export const getAwardsList = () => axiosInstance.get<AwardsResponse[] | AwardsResponse | [], any>("/gps/award")
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import axiosInstance from "../axios";
|
||||
|
||||
export type ScoreDataResponse = {
|
||||
export type ScoreData = {
|
||||
_id: string,
|
||||
deviceId: string,
|
||||
score: number,
|
||||
@@ -11,12 +11,11 @@ export type ScoreDataResponse = {
|
||||
id: string
|
||||
}
|
||||
|
||||
|
||||
export interface ScoreResponse {
|
||||
data: ScoreDataResponse[] | []
|
||||
data: ScoreData[] | []
|
||||
score: number,
|
||||
total: number
|
||||
}
|
||||
|
||||
export const getScoresList = () => axiosInstance.get<ScoreResponse>("/gps/score")
|
||||
export const getScoresList = () => axiosInstance.get<ScoreData, any>("/gps/score")
|
||||
|
||||
|
||||
@@ -1,3 +1,30 @@
|
||||
import axiosInstance from "../axios";
|
||||
|
||||
export const getTransactionsList = () => axiosInstance.get<any>("/gps/transactions")
|
||||
export interface TransactionsResponse {
|
||||
data: TransactionsData[] | []
|
||||
}
|
||||
|
||||
export interface TransactionsData {
|
||||
_id: string,
|
||||
card: TransactionsCard
|
||||
userId: string,
|
||||
amount: number,
|
||||
dollarAmount: number,
|
||||
status: number,
|
||||
created_at: string,
|
||||
updated_at: string,
|
||||
__v: number,
|
||||
id: string
|
||||
}
|
||||
|
||||
export interface TransactionsCard {
|
||||
_id: string,
|
||||
holderName: string,
|
||||
PAN: number,
|
||||
IBAN: string,
|
||||
created_at: string,
|
||||
updated_at: string,
|
||||
id: string
|
||||
}
|
||||
|
||||
export const getTransactionsList = () => axiosInstance.get<TransactionsResponse>("/gps/transactions")
|
||||
Reference in New Issue
Block a user