update
This commit is contained in:
1 parent
d3fdba1139
commit
70066f3086
5 files changed
+82
-78
No files matched your search
+8
-4
@@ -6,7 +6,7 @@ export interface IEntry {
|
||||
id: string
|
||||
entry: string[]
|
||||
reading: string[]
|
||||
english: string[]
|
||||
translation: string[]
|
||||
type: IType
|
||||
description: string
|
||||
tag: string[]
|
||||
@@ -148,7 +148,7 @@ class Api {
|
||||
}
|
||||
|
||||
async extra_delete(params: { id: string }) {
|
||||
return await this.axios.delete('/api/extra/delete', {
|
||||
return await this.axios.delete('/api/extra', {
|
||||
params,
|
||||
})
|
||||
}
|
||||
@@ -167,7 +167,9 @@ class Api {
|
||||
)
|
||||
}
|
||||
|
||||
async character_getVocabulary(params: ILookup<{ entry: string }>) {
|
||||
async character_getVocabulary(
|
||||
params: ILookup<{ entry: string; distinct?: 'id' }>
|
||||
) {
|
||||
return await this.axios.get('/api/character/vocabulary', { params }).then(
|
||||
(r) =>
|
||||
r.data as ILookupResult<{
|
||||
@@ -176,7 +178,9 @@ class Api {
|
||||
)
|
||||
}
|
||||
|
||||
async character_getSentence(params: ILookup<{ entry: string }>) {
|
||||
async character_getSentence(
|
||||
params: ILookup<{ entry: string; distinct?: 'id' }>
|
||||
) {
|
||||
return await this.axios.get('/api/character/sentence', { params }).then(
|
||||
(r) =>
|
||||
r.data as ILookupResult<{
|
||||
|
||||
@@ -74,3 +74,7 @@ export function capitalize(s: string): string {
|
||||
if (!s) return s
|
||||
return s[0].toLocaleUpperCase() + s.substr(1)
|
||||
}
|
||||
|
||||
export function jsonClone<T>(o: T): T {
|
||||
return JSON.parse(JSON.stringify(o))
|
||||
}
|
||||
Reference in new issue
Block a user