refactor axios.

This commit is contained in:
2023-01-08 14:42:54 +08:00
parent 7bea386dbc
commit e306e6b463
16 changed files with 270 additions and 113 deletions

51
src/utils/types.ts Normal file
View File

@@ -0,0 +1,51 @@
export type LANGUAGE =
| "C"
| "C++"
| "Python2"
| "Python3"
| "Java"
| "JavaScript"
| "Golang"
export interface Problem {
_id: string
id: number
tags: string[]
created_by: {
id: number
username: string
real_name: null
}
template: { [key in LANGUAGE]?: string }
title: string
description: string
input_description: string
output_description: string
samples: {
input: string
output: string
}[]
hint: string
languages: Array<LANGUAGE>
create_time: Date
last_update_time: null
time_limit: number
memory_limit: number
io_mode: {
input: string
output: string
io_mode: string
}
spj: boolean
spj_language: null
rule_type: string
difficulty: "Low" | "Mid" | "High"
source: string
total_score: number
submission_number: number
accepted_number: number
statistic_info: {}
share_submission: boolean
contest: null
my_status: number
}