20 lines
345 B
Go
20 lines
345 B
Go
package response
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"git.sendico.io/tech/sxchnge/shared/logging"
|
|
)
|
|
|
|
type Result struct {
|
|
Result bool `json:"result"`
|
|
}
|
|
|
|
func Success(logger mlogger.Logger) http.HandlerFunc {
|
|
return Ok(logger, Result{Result: true})
|
|
}
|
|
|
|
func Failed(logger mlogger.Logger) http.HandlerFunc {
|
|
return Accepted(logger, Result{Result: false})
|
|
}
|