temp
This commit is contained in:
parent
862b29cfa4
commit
53cd97454d
1379
pnpm-lock.yaml
generated
Normal file
1379
pnpm-lock.yaml
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -19,6 +19,9 @@ export type UploadConfig = {
|
|||||||
type PostOpts = {
|
type PostOpts = {
|
||||||
token?: string;
|
token?: string;
|
||||||
};
|
};
|
||||||
|
export const defaultConfigKeys = ['upload.json', 'workspace.json', 'ai.json', 'user.json', 'vip.json'] as const;
|
||||||
|
type DefaultConfigKey = (typeof defaultConfigKeys)[number];
|
||||||
|
|
||||||
export class QueryConfig {
|
export class QueryConfig {
|
||||||
query: Query;
|
query: Query;
|
||||||
constructor(opts?: QueryConfigOpts) {
|
constructor(opts?: QueryConfigOpts) {
|
||||||
@ -95,7 +98,7 @@ export class QueryConfig {
|
|||||||
* @param key
|
* @param key
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
async getConfigByKey(key: string, opts?: PostOpts) {
|
async getConfigByKey(key: DefaultConfigKey, opts?: PostOpts) {
|
||||||
return this.post<Result<Config>>({
|
return this.post<Result<Config>>({
|
||||||
key: 'defaultConfig',
|
key: 'defaultConfig',
|
||||||
configKey: key,
|
configKey: key,
|
||||||
@ -124,7 +127,7 @@ export class VipQueryConfig extends QueryConfig {
|
|||||||
key: 'shareConfig',
|
key: 'shareConfig',
|
||||||
data: {
|
data: {
|
||||||
type: 'vip',
|
type: 'vip',
|
||||||
username: 'admin',
|
username: 'root',
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user