Add support for websocket api

This commit is contained in:
2022-12-12 17:35:41 -08:00
parent 6074dcd419
commit 54c27ff977
4 changed files with 99 additions and 1 deletions

View File

@@ -25,3 +25,8 @@ type LemmyError struct {
func (le LemmyError) Error() string {
return fmt.Sprintf("%d %s: %s", le.Code, http.StatusText(le.Code), le.ErrStr)
}
type LemmyWebSocketMsg struct {
Op UserOperation `json:"op"`
Data any `json:"data"`
}