Skip to content

Commit

Permalink
Fix job edits (#1811)
Browse files Browse the repository at this point in the history
  • Loading branch information
ekzyis authored Jan 6, 2025
1 parent 29c31e3 commit c741072
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/resolvers/item.js
Original file line number Diff line number Diff line change
Expand Up @@ -1434,7 +1434,7 @@ export const updateItem = async (parent, { sub: subName, forward, hash, hmac, ..
// but forever if an admin is editing an "admin item", it's their bio or a job
const myBio = user.bioId === old.id
const timer = Date.now() < datePivot(new Date(old.invoicePaidAt ?? old.createdAt), { seconds: ITEM_EDIT_SECONDS })
const canEdit = (timer && ownerEdit) || adminEdit || myBio || isJob(item)
const canEdit = (timer && ownerEdit) || adminEdit || myBio || isJob(old)
if (!canEdit) {
throw new GqlInputError('item can no longer be edited')
}
Expand Down

0 comments on commit c741072

Please sign in to comment.