chore: bump @kevisual/router to version 0.0.75, update QueryClient constructor, and enhance token handling in Query class
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user