mirror of
https://github.com/m1k1o/neko.git
synced 2025-08-03 16:59:12 +02:00
Data -> Payload & change order.
This commit is contained in:
parent
ac2fc100b4
commit
18ca647c76
3 changed files with 21 additions and 21 deletions
|
@ -6,7 +6,7 @@ import (
|
|||
"demodesk/neko/internal/utils"
|
||||
)
|
||||
|
||||
type ClipboardData struct {
|
||||
type ClipboardPayload struct {
|
||||
Text string `json:"text"`
|
||||
}
|
||||
|
||||
|
@ -14,13 +14,13 @@ func (h *RoomHandler) ClipboardRead(w http.ResponseWriter, r *http.Request) {
|
|||
// TODO: error check?
|
||||
text := h.desktop.ReadClipboard()
|
||||
|
||||
utils.HttpSuccess(w, ClipboardData{
|
||||
utils.HttpSuccess(w, ClipboardPayload{
|
||||
Text: text,
|
||||
})
|
||||
}
|
||||
|
||||
func (h *RoomHandler) ClipboardWrite(w http.ResponseWriter, r *http.Request) {
|
||||
data := &ClipboardData{}
|
||||
data := &ClipboardPayload{}
|
||||
if !utils.HttpJsonRequest(w, r, data) {
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue