run gofmt

This commit is contained in:
Bernhard B
2020-07-03 17:34:28 +02:00
parent e1c2853494
commit b62b243a90

View File

@@ -288,20 +288,17 @@ func NewApi(signalCliConfig string, attachmentTmpDir string) *Api {
// @Success 200 {object} About // @Success 200 {object} About
// @Router /v1/about [get] // @Router /v1/about [get]
func (a *Api) About(c *gin.Context) { func (a *Api) About(c *gin.Context) {
about := About{SupportedApiVersions: []string{"v1", "v2"}, BuildNr: 2} about := About{SupportedApiVersions: []string{"v1", "v2"}, BuildNr: 2}
c.JSON(200, about) c.JSON(200, about)
} }
// @Summary Register a phone number. // @Summary Register a phone number.
// @Tags Devices // @Tags Devices
// @Description Register a phone number with the signal network. // @Description Register a phone number with the signal network.
// @Accept json // @Accept json
// @Produce json // @Produce json
// @Success 201 // @Success 201
// @Failure 400 {object} Error // @Failure 400 {object} Error
// @Param number path string true "Registered Phone Number" // @Param number path string true "Registered Phone Number"
// @Router /v1/register/{number} [post] // @Router /v1/register/{number} [post]
@@ -379,14 +376,14 @@ func (a *Api) VerifyRegisteredNumber(c *gin.Context) {
// @Description Send a signal message // @Description Send a signal message
// @Accept json // @Accept json
// @Produce json // @Produce json
// @Success 201 {string} string "OK" // @Success 201 {string} string "OK"
// @Failure 400 {object} Error // @Failure 400 {object} Error
// @Param number path string true "Registered Phone Number" // @Param number path string true "Registered Phone Number"
// @Param data body SendMessageV1 true "Input Data" // @Param data body SendMessageV1 true "Input Data"
// @Router /v1/send/{number} [post] // @Router /v1/send/{number} [post]
// @Deprecated // @Deprecated
func (a *Api) Send(c *gin.Context) { func (a *Api) Send(c *gin.Context) {
var req SendMessageV1 var req SendMessageV1
err := c.BindJSON(&req) err := c.BindJSON(&req)
if err != nil { if err != nil {
@@ -407,7 +404,7 @@ func (a *Api) Send(c *gin.Context) {
// @Description Send a signal message // @Description Send a signal message
// @Accept json // @Accept json
// @Produce json // @Produce json
// @Success 201 {string} string "OK" // @Success 201 {string} string "OK"
// @Failure 400 {object} Error // @Failure 400 {object} Error
// @Param number path string true "Registered Phone Number" // @Param number path string true "Registered Phone Number"
// @Param data body SendMessageV2 true "Input Data" // @Param data body SendMessageV2 true "Input Data"
@@ -495,7 +492,7 @@ func (a *Api) Receive(c *gin.Context) {
// @Description Create a new Signal Group with the specified members. // @Description Create a new Signal Group with the specified members.
// @Accept json // @Accept json
// @Produce json // @Produce json
// @Success 201 {object} CreateGroup // @Success 201 {object} CreateGroup
// @Failure 400 {object} Error // @Failure 400 {object} Error
// @Param number path string true "Registered Phone Number" // @Param number path string true "Registered Phone Number"
// @Router /v1/groups/{number} [post] // @Router /v1/groups/{number} [post]