Closed sancho20021 closed 2 years ago
Seems in issue description field visibility should be a query parametr
These issues can be solved by having a single endpoint that accepts an optional ?visibility=public/private query parameter and an optional FieldContents.
Seems in issue description field visibility should be a query parametr
Yes but that was an initial proposal, we later decided to split our queries into set-field
with indeed an optional visibility
parameter and set-field-visibility
.
I don't want the set-field-visibility
to take visibility as a parameter because it would require repeating the word visibility
two times:
/set-field-visibility/?visibility=private
Ok, IMO it would be more logical to make it query. JSON looks like overshot. And seems nothing chain us to JSON format
Ok, IMO it would be more logical to make it query. JSON looks like overshot. And seems nothing chain us to JSON format
Yeah, will redo.
@Kariel-Myrr I moved visibility from JSON body to the query string. Now a request looks like
/set-field-visibility/public
This PR is closed due to existing https://github.com/serokell/coffer/pull/130.
Description
Problem:
set-field
route was used both for changing visibility and setting new fields. This resulted in additional handling of the situation where both field contents and visibility option are missing.Solution: require contents for setting field and allow changing visibility for convenience. Add
set-field-visibility
request which modifies only visibility.Question?
Currently in
set-field-visibility
I pass the value in the body of the request. Maybe it would be better to pass it in the request string itself:I don't know.
Related issue(s)
Fixed part of #119. Refactor of CLI API still needed.
:white_check_mark: Checklist for your Pull Request
Related changes (conditional)
Tests
Documentation
Stylistic guide (mandatory)