Skip to content

Commit 391cd26

Browse files
committed
change function name to restore by asset ids
1 parent 29bc9da commit 391cd26

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

lib/api.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ exports.restore = function restore(public_ids, callback, options = {}) {
125125
}, callback, options);
126126
};
127127

128-
exports.restore_by_asset_id = function restore_by_asset_id(asset_ids, callback, options = {}) {
128+
exports.restore_by_asset_ids = function restore_by_asset_ids(asset_ids, callback, options = {}) {
129129
options.content_type = "json";
130130
let uri = ["resources", "restore"];
131131
return call_api(

test/integration/api/admin/api_spec.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1457,7 +1457,7 @@ describe("api", function () {
14571457
});
14581458
});
14591459

1460-
describe("restore_by_asset_id", function () {
1460+
describe("restore_by_asset_ids", function () {
14611461
this.timeout(TIMEOUT.MEDIUM);
14621462

14631463
const publicId = "api_test_restore" + UNIQUE_JOB_SUFFIX_ID;
@@ -1485,7 +1485,7 @@ describe("api", function () {
14851485
);
14861486

14871487
it("should restore a deleted resource when passed an asset ID", () => cloudinary.v2.api
1488-
.restore_by_asset_id([uploadedAssetId])
1488+
.restore_by_asset_ids([uploadedAssetId])
14891489
.then((response) => {
14901490
let info = response[uploadedAssetId];
14911491
expect(info).not.to.be(null);
@@ -1549,7 +1549,7 @@ describe("api", function () {
15491549

15501550
// Restore first version by passing in the asset ID, ensure it's equal to the upload size
15511551
await wait(1000)();
1552-
const firstVerRestore = await API_V2.restore_by_asset_id([assetId], {
1552+
const firstVerRestore = await API_V2.restore_by_asset_ids([assetId], {
15531553
versions: [firstAssetVersion]
15541554
});
15551555

@@ -1559,7 +1559,7 @@ describe("api", function () {
15591559

15601560
// Restore second version by passing in the asset ID, ensure it's equal to the upload size
15611561
await wait(1000)();
1562-
const secondVerRestore = await API_V2.restore_by_asset_id(
1562+
const secondVerRestore = await API_V2.restore_by_asset_ids(
15631563
[assetId],
15641564
{ versions: [secondAssetVersion] }
15651565
);
@@ -1617,7 +1617,7 @@ describe("api", function () {
16171617
const IDS_TO_RESTORE = [firstAssetId, secondAssetId];
16181618
const VERSIONS_TO_RESTORE = [firstAssetVersion, secondAssetVersion];
16191619

1620-
const restore = await API_V2.restore_by_asset_id(IDS_TO_RESTORE, {
1620+
const restore = await API_V2.restore_by_asset_ids(IDS_TO_RESTORE, {
16211621
versions: VERSIONS_TO_RESTORE
16221622
});
16231623

0 commit comments

Comments
 (0)