This repository has been archived by the owner on Apr 3, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(firmware): add endpoint for modem firmware
- Loading branch information
1 parent
e657197
commit 401edb9
Showing
3 changed files
with
45 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
angular.module("ovh-api-services").service("OvhApiXdslModemFirmware", function ($injector, $cacheFactory) { | ||
"use strict"; | ||
|
||
var cache = $cacheFactory("OvhApiXdslModemFirmware"); | ||
|
||
return { | ||
v6: function () { | ||
return $injector.get("OvhApiXdslModemFirmwareV6"); | ||
}, | ||
resetCache: cache.removeAll, | ||
cache: cache | ||
}; | ||
}); |
29 changes: 29 additions & 0 deletions
29
src/xdsl/modem/firmware/xdsl-modem-firmware.v6.services.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
angular.module("ovh-api-services").service("OvhApiXdslModemFirmwareV6", function ($resource, OvhApiXdslModemFirmware) { | ||
"use strict"; | ||
|
||
var interceptor = { | ||
response: function (response) { | ||
OvhApiXdslModemFirmware.resetCache(); | ||
return response.resource; | ||
} | ||
}; | ||
|
||
return $resource("/xdsl/:xdslId/modem/firmware", { | ||
xdslId: "@xdslId" | ||
}, { | ||
get: { | ||
method: "GET", | ||
reponseType: "text" | ||
}, | ||
post: { | ||
method: "POST", | ||
interceptor: interceptor | ||
}, | ||
available: { | ||
method: "GET", | ||
url: "/xdsl/:xdslId/modem/firmwareAvailable", | ||
isArray: true, | ||
cache: OvhApiXdslModemFirmware.cache | ||
} | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters