[FIX] callbacks elements
This commit is contained in:
parent
2bc68321e3
commit
b479414bc2
@ -192,7 +192,7 @@ public class TsApiGeneration {
|
||||
data.append("\n\t\t\tdata,");
|
||||
}
|
||||
if (needGenerateProgress) {
|
||||
data.append("\n\t\t\tcallback,");
|
||||
data.append("\n\t\t\tcallbacks,");
|
||||
}
|
||||
data.append("\n\t\t}: {");
|
||||
data.append("\n\t\trestConfig: RESTConfig,");
|
||||
@ -350,7 +350,7 @@ public class TsApiGeneration {
|
||||
data.append("\n\t\t\tdata,");
|
||||
}
|
||||
if (needGenerateProgress) {
|
||||
data.append("\n\t\t\tcallback,");
|
||||
data.append("\n\t\t\tcallbacks,");
|
||||
}
|
||||
data.append("\n\t\t}");
|
||||
if (returnComplexModel != null) {
|
||||
|
@ -237,7 +237,7 @@ export function RESTRequest({
|
||||
data,
|
||||
params,
|
||||
queries,
|
||||
callback,
|
||||
callbacks,
|
||||
}: RESTRequestType): Promise<ModelResponseHttp> {
|
||||
// Create the URL PATH:
|
||||
let generateUrl = RESTUrl({ restModel, restConfig, data, params, queries });
|
||||
@ -268,10 +268,10 @@ export function RESTRequest({
|
||||
return new Promise((resolve, reject) => {
|
||||
let action: undefined | Promise<Response> = undefined;
|
||||
if (
|
||||
isNullOrUndefined(callback) ||
|
||||
(isNullOrUndefined(callback.progressDownload) &&
|
||||
isNullOrUndefined(callback.progressUpload) &&
|
||||
isNullOrUndefined(callback.abortHandle))
|
||||
isNullOrUndefined(callbacks) ||
|
||||
(isNullOrUndefined(callbacks.progressDownload) &&
|
||||
isNullOrUndefined(callbacks.progressUpload) &&
|
||||
isNullOrUndefined(callbacks.abortHandle))
|
||||
) {
|
||||
// No information needed: call the generic fetch interface
|
||||
action = fetch(generateUrl, {
|
||||
@ -288,7 +288,7 @@ export function RESTRequest({
|
||||
headers,
|
||||
body,
|
||||
},
|
||||
callback
|
||||
callbacks
|
||||
);
|
||||
}
|
||||
action
|
||||
|
Loading…
x
Reference in New Issue
Block a user