Skip to content

Commit

Permalink
ref: requested changes applied
Browse files Browse the repository at this point in the history
  • Loading branch information
Rooyca committed Sep 3, 2024
1 parent 56a6478 commit 83d7eec
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export class InternalModuleWeb extends InternalModule {

async create_static_templates(): Promise<void> {
this.static_functions.set("daily_quote", this.generate_daily_quote());
this.static_functions.set("request", this.make_request());
this.static_functions.set("request", this.generate_request());
this.static_functions.set(
"random_picture",
this.generate_random_picture()
Expand Down Expand Up @@ -83,7 +83,7 @@ export class InternalModuleWeb extends InternalModule {
};
}

make_request(): (
generate_request(): (
url: string,
path?: string,
) => Promise<string> {
Expand All @@ -102,7 +102,7 @@ export class InternalModuleWeb extends InternalModule {
}, jsonData);
}

return JSON.stringify(jsonData, null, 2);
return jsonData;
} catch (error) {
console.error(error);
throw new TemplaterError("Error fetching and extracting value");
Expand Down

0 comments on commit 83d7eec

Please sign in to comment.