Skip to content

Commit

Permalink
UI: remove unused template API code (#6611)
Browse files Browse the repository at this point in the history
  • Loading branch information
nopcoder authored Sep 18, 2023
1 parent d74138e commit ada2c8a
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions webui/src/lib/api/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1059,22 +1059,6 @@ class MetaRanges {
}
}

class Templates {
async expandTemplate(templateLocation, params) {
const urlParams = new URLSearchParams();
for (const [k, v] of Object.entries(params)) {
urlParams.set(k, v);
}
const response = await apiRequest(
`/templates/${encodeURI(templateLocation)}?${urlParams.toString()}`,
{method: 'GET'});
if (!response.ok) {
throw new Error(await extractError(response));
}
return response.text();
}
}

class Statistics {
async postStatsEvents(statsEvents) {
const request = {
Expand Down Expand Up @@ -1191,7 +1175,6 @@ export const config = new Config();
export const branchProtectionRules = new BranchProtectionRules();
export const ranges = new Ranges();
export const metaRanges = new MetaRanges();
export const templates = new Templates();
export const statistics = new Statistics();
export const staging = new Staging();
export const otfDiffs = new OTFDiffs();
Expand Down

0 comments on commit ada2c8a

Please sign in to comment.