Skip to content

Commit

Permalink
fix(web) drop dead software client methods
Browse files Browse the repository at this point in the history
They were replaced by queries and the software itself is going to be
drop in the short term.
  • Loading branch information
dgdavid committed Jul 24, 2024
1 parent 4c1f368 commit 7018014
Showing 1 changed file with 0 additions and 37 deletions.
37 changes: 0 additions & 37 deletions web/src/client/software.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,43 +76,6 @@ class SoftwareBaseClient {
constructor(client) {
this.client = client;
}

/**
* Asks the service to reload the repositories metadata
*
* @return {Promise<Response>}
*/
probe() {
return this.client.post("/software/probe", {});
}

/**
* @return {Promise<SoftwareConfig>}
*/
config() {
return this.client.get("/software/config");
}

/**
* @param {Object.<string, boolean>} patterns - An object where the keys are the pattern names
* and the values whether to install them or not.
* @return {Promise<Response>}
*/
selectPatterns(patterns) {
return this.client.put("/software/config", { patterns });
}

/**
* Registers a callback to run when the select product changes.
*
* @param {(changes: object) => void} handler - Callback function.
* @return {import ("./http").RemoveFn} Function to remove the callback.
*/
onSelectedPatternsChanged(handler) {
return this.client.onEvent("SoftwareProposalChanged", ({ patterns }) => {
handler(patterns);
});
}
}

/**
Expand Down

0 comments on commit 7018014

Please sign in to comment.