Skip to content

Commit 66dfaf8

Browse files
committed
Remoce deviceToken checking for android on saving installation
1 parent f2c33c0 commit 66dfaf8

File tree

2 files changed

+0
-25
lines changed

2 files changed

+0
-25
lines changed

spec/ParseInstallation.spec.js

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -133,26 +133,6 @@ describe('Installations', () => {
133133
});
134134
});
135135

136-
it('fails for android with device token', (done) => {
137-
var installId = '12345678-abcd-abcd-abcd-123456789abc';
138-
var t = '11433856eed2f1285fb3aa11136718c1198ed5647875096952c66bf8cb976306';
139-
var device = 'android';
140-
var input = {
141-
'installationId': installId,
142-
'deviceType': device,
143-
'deviceToken': t,
144-
'channels': ['foo', 'bar']
145-
};
146-
rest.create(config, auth.nobody(config), '_Installation', input)
147-
.then(() => {
148-
fail('Should not have been able to create an Installation.');
149-
done();
150-
}).catch((error) => {
151-
expect(error.code).toEqual(114);
152-
done();
153-
});
154-
});
155-
156136
it('fails for android with missing type', (done) => {
157137
var installId = '12345678-abcd-abcd-abcd-123456789abc';
158138
var input = {

src/RestWrite.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -487,11 +487,6 @@ RestWrite.prototype.handleInstallation = function() {
487487
this.data.installationId = this.data.installationId.toLowerCase();
488488
}
489489

490-
if (this.data.deviceToken && this.data.deviceType == 'android') {
491-
throw new Parse.Error(114,
492-
'deviceToken may not be set for deviceType android');
493-
}
494-
495490
var promise = Promise.resolve();
496491

497492
if (this.query && this.query.objectId) {

0 commit comments

Comments
 (0)