mirror of
https://github.com/m1k1o/neko.git
synced 2025-06-01 10:22:35 +02:00
join plain text and rich text to one struct.
This commit is contained in:
parent
5c9a57ee91
commit
546cd608c3
6 changed files with 63 additions and 62 deletions
|
@ -38,14 +38,18 @@ func (h *RoomHandler) Route(r chi.Router) {
|
|||
})
|
||||
|
||||
r.With(auth.HostsOnly).Route("/clipboard", func(r chi.Router) {
|
||||
r.Get("/", h.clipboardGetPlainText)
|
||||
r.Post("/", h.clipboardSetPlainText)
|
||||
r.Get("/targets", h.clipboardGetTargets)
|
||||
r.Get("/html", h.clipboardGetRichText)
|
||||
r.Post("/html", h.clipboardSetRichText)
|
||||
r.Get("/image", h.clipboardGetImage)
|
||||
// TODO: Refactor.
|
||||
r.Get("/", h.clipboardGetText)
|
||||
r.Post("/", h.clipboardSetText)
|
||||
r.Get("/image.png", h.clipboardGetImage)
|
||||
|
||||
// TODO: Refactor. xclip is failing to set propper target type
|
||||
// and this content is sent back to client as text in another
|
||||
// clipboard update. Therefore endpoint is not usable!
|
||||
//r.Post("/image", h.clipboardSetImage)
|
||||
|
||||
// TODO: Refactor. If there would be implemented custom target
|
||||
// retrieval, this endpoint would be useful.
|
||||
//r.Get("/targets", h.clipboardGetTargets)
|
||||
})
|
||||
|
||||
r.Route("/keyboard", func(r chi.Router) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue