mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-22 23:53:50 +00:00
Add conflict resolution for generated API + add test
Implemented additional code to handle version conflicts when editing accompanying period work. By keeping track of the current version and returning an HTTP conflict response when it doesn't match with the provided entity version, users are properly alerted to update their entity before continuing. Furthermore, adjusted BadRequestHttpException to match correct arguments order and introduced entity version as query parameter for the URL. ensure kernel is shutdown after generating data
This commit is contained in:
@@ -503,7 +503,8 @@ const store = createStore({
|
||||
submit({ getters, state, commit }, callback) {
|
||||
let
|
||||
payload = getters.buildPayload,
|
||||
url = `/api/1.0/person/accompanying-course/work/${state.work.id}.json`,
|
||||
params = new URLSearchParams({'entity_version': state.version}),
|
||||
url = `/api/1.0/person/accompanying-course/work/${state.work.id}.json?${params}`,
|
||||
errors = []
|
||||
;
|
||||
|
||||
|
Reference in New Issue
Block a user