mirror of
https://github.com/mainflux/mainflux.git
synced 2025-05-02 22:17:10 +08:00

* Add can access by things ID endpoint to things service Signed-off-by: Aleksandar Novakovic <anovakovic01@gmail.com> * Add new auth endpoint to the swagger docs Signed-off-by: Aleksandar Novakovic <anovakovic01@gmail.com> * Add test for the new endpoint of the things service Signed-off-by: Aleksandar Novakovic <anovakovic01@gmail.com>
41 lines
613 B
Go
41 lines
613 B
Go
//
|
|
// Copyright (c) 2019
|
|
// Mainflux
|
|
//
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
//
|
|
|
|
package http
|
|
|
|
import "net/http"
|
|
|
|
type identityRes struct {
|
|
ID string `json:"id"`
|
|
}
|
|
|
|
func (res identityRes) Code() int {
|
|
return http.StatusOK
|
|
}
|
|
|
|
func (res identityRes) Headers() map[string]string {
|
|
return map[string]string{}
|
|
}
|
|
|
|
func (res identityRes) Empty() bool {
|
|
return false
|
|
}
|
|
|
|
type canAccessByIDRes struct{}
|
|
|
|
func (res canAccessByIDRes) Code() int {
|
|
return http.StatusOK
|
|
}
|
|
|
|
func (res canAccessByIDRes) Headers() map[string]string {
|
|
return map[string]string{}
|
|
}
|
|
|
|
func (res canAccessByIDRes) Empty() bool {
|
|
return true
|
|
}
|