wasmcloud/cmd/wasmcloudd/api.go

12 lines
205 B
Go

package main
import (
"encoding/json"
"net/http"
)
func apiWhoami(w http.ResponseWriter, r *http.Request, u *User) {
w.Header().Set("Content-Type", "application/json")
json.NewEncoder(w).Encode(u)
}