Skip to content

Commit

Permalink
Added build url
Browse files Browse the repository at this point in the history
  • Loading branch information
ackava committed Dec 9, 2024
1 parent 50c513c commit 8705947
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/services/BaseEntityService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ export default abstract class BaseEntityService extends TaskManager {
// }) as Promise<T>;
}

run<T extends IClrEntity, TA, TQ>(m: IModel<T, TQ, TA>, method: keyof TA, argEntity: Partial<T>, {
buildRunUrl<T extends IClrEntity, TA, TQ>(m: IModel<T, TQ, TA>, method: keyof TA, argEntity: Partial<T>, {
args = void 0 as any[],
cacheSeconds = 0,
cacheVersion = void 0 as any
Expand All @@ -482,7 +482,17 @@ export default abstract class BaseEntityService extends TaskManager {
if (cacheVersion) {
usp.append("cv", cacheVersion);
}
return FetchBuilder.get(`${this.url}run/${$type}/${method as any}?${usp.toString()}`).jsonPostProcessor(this.resultConverter);
return `${this.url}run/${$type}/${method as any}?${usp.toString()}`;
}

run<T extends IClrEntity, TA, TQ>(m: IModel<T, TQ, TA>, method: keyof TA, argEntity: Partial<T>, {
args = void 0 as any[],
cacheSeconds = 0,
cacheVersion = void 0 as any
} = {
}) {
const url = this.buildRunUrl(m, method, argEntity, { args, cacheSeconds, cacheVersion });
return FetchBuilder.get(url).jsonPostProcessor(this.resultConverter);
}


Expand Down

0 comments on commit 8705947

Please sign in to comment.