Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Chiefs
ChiefSend2
Commits
216f9992
Commit
216f9992
authored
Mar 23, 2021
by
Lukas Böhm
🎱
Browse files
fix json content-type
parent
1f5dc7a9
Changes
2
Hide whitespace changes
Inline
Side-by-side
api/api.go
View file @
216f9992
...
...
@@ -162,8 +162,6 @@ func OpenShare(w http.ResponseWriter, r *http.Request) *HTTPError {
return
&
HTTPError
{
err
,
"Can't create directory"
,
500
}
}
// return 201
w
.
WriteHeader
(
http
.
StatusCreated
)
return
SendJSON
(
w
,
newShare
)
}
...
...
@@ -252,7 +250,6 @@ func UploadAttachment(w http.ResponseWriter, r *http.Request) *HTTPError {
db
.
Commit
()
}
w
.
WriteHeader
(
http
.
StatusCreated
)
return
SendJSON
(
w
,
att
)
}
...
...
swagger.yaml
View file @
216f9992
...
...
@@ -26,7 +26,7 @@ paths:
summary
:
create an open share
operationId
:
OpenShare
responses
:
'
20
1
'
:
'
20
0
'
:
description
:
new temporary share
content
:
application/json
:
...
...
@@ -100,7 +100,7 @@ paths:
parameters
:
-
$ref
:
'
#/components/parameters/id'
responses
:
'
20
1
'
:
'
20
0
'
:
description
:
the attachment
content
:
application/json
:
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment