mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-20 22:42:53 -05:00
Fixed edit method to accept a string
refs https://github.com/TryGhost/Team/issues/2078 This fixes a bug with the edit method where we passed a raw string rather than ObjectID
This commit is contained in:
parent
93e392fac1
commit
9e7b009236
1 changed files with 2 additions and 1 deletions
|
@ -81,7 +81,8 @@ module.exports = class TiersAPI {
|
|||
* @param {object} data
|
||||
* @returns {Promise<Tier>}
|
||||
*/
|
||||
async edit(id, data) {
|
||||
async edit(idString, data) {
|
||||
const id = ObjectID.createFromHexString(idString);
|
||||
const tier = await this.#repository.getById(id);
|
||||
|
||||
const editableProperties = [
|
||||
|
|
Loading…
Add table
Reference in a new issue