Skip to content

Commit 9ad595c

Browse files
authored
Merge pull request #270 from opentok/patch/269
patch response to 204
2 parents 57d49a7 + d73174d commit 9ad595c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lib/archiving.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@ function patchArchive(config, archiveId, options, callback) {
413413
'/archive/' + encodeURIComponent(archiveId) + '/streams',
414414
options,
415415
function patchArchiveCallback(err, response, body) {
416-
if (err || response.statusCode !== 200) {
416+
if (err || response.statusCode !== 204) {
417417
if (response && response.statusCode === 400) {
418418
callback(new errors.ArgumentError('Invalid request: ' + JSON.stringify(body)));
419419
}

spec/opentok_spec.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,7 @@ describe('Archiving', function () {
475475
it('should patch an archive with addStream', function (done) {
476476
nock(archiveHostUrl)
477477
.patch(archivePatchResource, { addStream: mockStreamId, hasAudio: true, hasVideo: true })
478-
.reply(200);
478+
.reply(204);
479479

480480
opentok.addArchiveStream(mockArchiveId, mockStreamId, {
481481
hasAudio: true, hasVideo: true
@@ -488,7 +488,7 @@ describe('Archiving', function () {
488488
it('should patch an archive with just addStream', function (done) {
489489
nock(archiveHostUrl)
490490
.patch(archivePatchResource, { addStream: mockStreamId, hasAudio: true, hasVideo: true })
491-
.reply(200);
491+
.reply(204);
492492

493493
opentok.addArchiveStream(mockArchiveId, mockStreamId, function (err) {
494494
expect(err).toBeNull();
@@ -499,7 +499,7 @@ describe('Archiving', function () {
499499
it('should patch an archive with removeStream', function (done) {
500500
nock(archiveHostUrl)
501501
.patch(archivePatchResource, { removeStream: mockStreamId })
502-
.reply(200);
502+
.reply(204);
503503

504504
opentok.removeArchiveStream(mockArchiveId, mockStreamId, function (err) {
505505
expect(err).toBeNull();

0 commit comments

Comments
 (0)