• Sebastian Ziebell's avatar
    API: fixes a few return codes for project snippets · fd01f3aa
    Sebastian Ziebell authored
    When using project snippets via API the functions now provide status codes for
    different situations other then only returning 404 error. If required parameters are missing,
    e.g. `title` when creating a project snippet a 400 (Bad request) error is returned. The snippet
    delete function now is idempotent and returns a 200 (Ok) regardless if the snippet with the
    given id is available or not. Changing return codes of these functions has the advantage that
    the 404 error is used only for resources, which are not available.
    
    Tests added to check these status codes when handling project snippets.
    fd01f3aa
projects_spec.rb 16.6 KB