rs / rest-layer

REST Layer, Go (golang) REST API framework
http://rest-layer.io
MIT License
1.26k stars 114 forks source link

Recalculate ETag after OnUpdate/OnInsert hooks, before storing. Fixes… #257

Closed Dragomir-Ivanov closed 5 years ago

Dragomir-Ivanov commented 5 years ago

… #255

Dragomir-Ivanov commented 5 years ago

About documentation...since this behavior sound common sense, do I still need to add some clarification in the README?

smyrman commented 5 years ago

Probably it's OK without additional documentation at this stage.

smyrman commented 5 years ago

@Dragomir-Ivanov, do you consider this ready for merge?

smyrman commented 5 years ago

If you can, maybe improve the commit message according to these conventions:

Especially the subject line is important (to make history look better). E.g.

Recalculate E-Tag right before before storing items

E-tags used to be set after parsing an item only, before potential hooks
alter the item content. This change adds a final step to resource Update
and Create operations to recalculate E-tags right before passing items
to the Storer back-end.

Fixes #257 

Or something like that

Dragomir-Ivanov commented 5 years ago

Thanks for the suggestion @smyrman. Recommitted with the new message & ready for merge.