mirror of
https://github.com/aljazceru/signal-cli-rest-api.git
synced 2025-12-19 23:54:22 +01:00
ran go-fmt on complete sourcecode
This commit is contained in:
@@ -3,10 +3,10 @@ package api
|
|||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
"errors"
|
||||||
"net/http"
|
"net/http"
|
||||||
"strconv"
|
"strconv"
|
||||||
"time"
|
"time"
|
||||||
"errors"
|
|
||||||
|
|
||||||
"github.com/gabriel-vasile/mimetype"
|
"github.com/gabriel-vasile/mimetype"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
@@ -1351,7 +1351,6 @@ func (a *Api) SearchForNumbers(c *gin.Context) {
|
|||||||
c.JSON(200, searchResponse)
|
c.JSON(200, searchResponse)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// @Summary Updates the info associated to a number on the contact list. If the contact doesn’t exist yet, it will be added.
|
// @Summary Updates the info associated to a number on the contact list. If the contact doesn’t exist yet, it will be added.
|
||||||
// @Tags Contacts
|
// @Tags Contacts
|
||||||
// @Description Updates the info associated to a number on the contact list.
|
// @Description Updates the info associated to a number on the contact list.
|
||||||
|
|||||||
@@ -533,7 +533,7 @@ func (s *SignalClient) getJsonRpc2Client(number string) (*JsonRpc2Client, error)
|
|||||||
return nil, errors.New("Number not registered with JSON-RPC")
|
return nil, errors.New("Number not registered with JSON-RPC")
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *SignalClient) getJsonRpc2Clients() ([]*JsonRpc2Client) {
|
func (s *SignalClient) getJsonRpc2Clients() []*JsonRpc2Client {
|
||||||
jsonRpc2Clients := []*JsonRpc2Client{}
|
jsonRpc2Clients := []*JsonRpc2Client{}
|
||||||
for _, client := range s.jsonRpc2Clients {
|
for _, client := range s.jsonRpc2Clients {
|
||||||
jsonRpc2Clients = append(jsonRpc2Clients, client)
|
jsonRpc2Clients = append(jsonRpc2Clients, client)
|
||||||
|
|||||||
@@ -1,8 +1,10 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/bbernhard/signal-cli-rest-api/utils"
|
"github.com/bbernhard/signal-cli-rest-api/utils"
|
||||||
|
"github.com/gabriel-vasile/mimetype"
|
||||||
log "github.com/sirupsen/logrus"
|
log "github.com/sirupsen/logrus"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"os"
|
"os"
|
||||||
@@ -10,8 +12,6 @@ import (
|
|||||||
"path/filepath"
|
"path/filepath"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
"github.com/gabriel-vasile/mimetype"
|
|
||||||
"encoding/json"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
const supervisorctlConfigTemplate = `
|
const supervisorctlConfigTemplate = `
|
||||||
@@ -48,7 +48,6 @@ func isSignalCliLinkedNumberConfigFile(filename string) (bool, error) {
|
|||||||
return false, nil
|
return false, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
func getUsernameFromLinkedNumberConfigFile(filename string) (string, error) {
|
func getUsernameFromLinkedNumberConfigFile(filename string) (string, error) {
|
||||||
type LinkedNumberConfigFile struct {
|
type LinkedNumberConfigFile struct {
|
||||||
Username string `json:"username"`
|
Username string `json:"username"`
|
||||||
|
|||||||
Reference in New Issue
Block a user