coyote-team / coyote-drupal

0 stars 0 forks source link

Configuration: Provide Advanced Settings #7

Closed jkva closed 1 year ago

jkva commented 2 years ago

Related to #3.

catorghans commented 1 year ago

For item 3: Is this allowed als result from \RestApiController::callback to the coyote backend ?

return new JsonResponse(['status' => 'ignored']);

jkva commented 1 year ago

For item 3: Is this allowed als result from \RestApiController::callback to the coyote backend ?

return new JsonResponse(['status' => 'ignored']);

Very good question - yes, that seems a valid response, the Coyote Server does record the responses coming from webhook calls. There should also be a corresponding 'updated' response in the success scenario.

It would seem that the 'ignored' response should also be status 404, while the 'success' response should be 200.

catorghans commented 1 year ago

OK, 404 (not found) is possible, but would 403 (forbidden) not be better in this case?

jkva commented 1 year ago

403 seems apt in the case of calls being ignored, agreed. 404 would be in case calls are accepted but the resource does not exist drupal-side.

catorghans commented 1 year ago

ok, 403 it is.

catorghans commented 1 year ago

I am going to add a "unpublished" check in NodeViewAlterPostRenderHook now. And create a separate button "batch importing" on the config form which also takes the unpublished config-option into account when creating #1