mirror of
https://github.com/sudoxnym/habitica-self-host.git
synced 2026-07-16 11:11:43 +00:00
Fix: Updated challenge.js to allow shortName to be editable by party leader (#13654)
* updated challenge.js to allow shortName to be editable * fix api-v3 integration test error
This commit is contained in:
parent
a174b218bd
commit
9e0e805d35
2 changed files with 1 additions and 2 deletions
|
|
@ -74,7 +74,6 @@ describe('PUT /challenges/:challengeId', () => {
|
|||
expect(res.memberCount).to.equal(2);
|
||||
expect(res.tasksOrder).not.to.equal('new order');
|
||||
expect(res.official).to.equal(false);
|
||||
expect(res.shortName).not.to.equal('new short name');
|
||||
|
||||
expect(res.leader).to.eql({
|
||||
_id: user._id,
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ schema.pre('init', chal => {
|
|||
});
|
||||
|
||||
// A list of additional fields that cannot be updated (but can be set on creation)
|
||||
const noUpdate = ['group', 'leader', 'official', 'shortName', 'prize'];
|
||||
const noUpdate = ['group', 'leader', 'official', 'prize'];
|
||||
schema.statics.sanitizeUpdate = function sanitizeUpdate (updateObj) {
|
||||
return this.sanitize(updateObj, noUpdate);
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue