Skip to content

Commit

Permalink
fix: allow updates/deletes even if-none-match (leave it up to busines…
Browse files Browse the repository at this point in the history
…s logic to check for if-none-match header)
  • Loading branch information
titanism committed Jul 17, 2024
1 parent 1d83983 commit 55dc456
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion routes/calendar/calendar/put.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const { notFound, preconditionFail } = require('../../../common/x-build');
const { notFound } = require('../../../common/x-build');
// const { notFound, preconditionFail } = require('../../../common/x-build');
const { setMissingMethod } = require('../../../common/response');
const winston = require('../../../common/winston');

Expand Down Expand Up @@ -46,12 +47,14 @@ module.exports = function (options) {
log.debug(`existing event${existing ? '' : ' not'} found`);

if (existing) {
/*
if (ctx.get('if-none-match') === '*') {
log.warn('if-none-match: * header present, precondition failed');
ctx.status = 412;
ctx.body = preconditionFail(ctx.url, 'no-uid-conflict');
return;
}
*/

const updateObject = await options.data.updateEvent(ctx, {
eventId: ctx.state.params.eventId,
Expand Down

0 comments on commit 55dc456

Please sign in to comment.