1
0
mirror of https://github.com/mainflux/mainflux.git synced 2025-05-02 22:17:10 +08:00
2018-05-10 23:53:25 +02:00

26 lines
385 B
Go

package http
import (
"net/http"
"github.com/mainflux/mainflux"
)
var _ mainflux.Response = (*tokenRes)(nil)
type tokenRes struct {
Token string `json:"token,omitempty"`
}
func (res tokenRes) Code() int {
return http.StatusCreated
}
func (res tokenRes) Headers() map[string]string {
return map[string]string{}
}
func (res tokenRes) Empty() bool {
return res.Token == ""
}