chore: bump @kevisual/router to version 0.0.75, update QueryClient constructor, and enhance token handling in Query class

This commit is contained in:
2026-02-18 05:28:12 +08:00
parent 585becb6f5
commit 30245606d2
6 changed files with 56 additions and 97 deletions

View File

@@ -121,8 +121,11 @@ export class QueryApi<P extends { [path: string]: { [key: string]: Pos } } = {}>
}
for (const [key, pos] of Object.entries(methods)) {
that[path][key] = (data?: Partial<ExtractArgsFromMetadata<typeof pos>>, opts?: DataOpts) => {
that[path][key] = (data?: Partial<ExtractArgsFromMetadata<typeof pos>>, opts: DataOpts = {}) => {
const _pos = pick(pos, ['path', 'key', 'id']);
if (pos.metadata?.viewItem?.api?.url && !opts.url) {
opts.url = pos.metadata.viewItem.api.url;
}
return that.query.post({
..._pos,
payload: data