From 28e040531400c51308a235fcd4afc4a68d19d559 Mon Sep 17 00:00:00 2001 From: Barak Amar Date: Mon, 18 Sep 2023 11:22:00 +0300 Subject: [PATCH] UI: remove unused template API code --- webui/src/lib/api/index.js | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/webui/src/lib/api/index.js b/webui/src/lib/api/index.js index c6b6e604317..3b3988c711e 100644 --- a/webui/src/lib/api/index.js +++ b/webui/src/lib/api/index.js @@ -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 = { @@ -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();