Refactor into client + server backends
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
package client_api
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
type Describe struct {
|
||||
Name string `json:"name"`
|
||||
Icon string `json:"icon"`
|
||||
}
|
||||
|
||||
func describeHandler(data_dir string, w http.ResponseWriter, r *http.Request) {
|
||||
log.Debugf("/describe called\n")
|
||||
return_json := Describe{
|
||||
Name: "mediasrv-server",
|
||||
Icon: "",
|
||||
}
|
||||
data, err := json.Marshal(return_json)
|
||||
if err != nil {
|
||||
log.Errorf("Could not marshal data: %v\n", err)
|
||||
return
|
||||
}
|
||||
w.Write(data)
|
||||
}
|
||||
Reference in New Issue
Block a user