mirror of
https://github.com/aljazceru/signal-cli-rest-api.git
synced 2025-12-19 15:44:28 +01:00
Add a white border around the QR Image
This commit is contained in:
@@ -6,15 +6,16 @@ import (
|
||||
"encoding/base64"
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"os"
|
||||
"os/exec"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
uuid "github.com/gofrs/uuid"
|
||||
"github.com/h2non/filetype"
|
||||
log "github.com/sirupsen/logrus"
|
||||
qrcode "github.com/skip2/go-qrcode"
|
||||
"os"
|
||||
"os/exec"
|
||||
"strings"
|
||||
"time"
|
||||
)
|
||||
|
||||
const groupPrefix = "group."
|
||||
|
||||
@@ -169,8 +169,18 @@ var doc = `{
|
||||
},
|
||||
"/v1/qrcodelink": {
|
||||
"get": {
|
||||
"description": "test",
|
||||
"parameters": [
|
||||
{
|
||||
"in": "query",
|
||||
"name": "device_name",
|
||||
"type": "string",
|
||||
"required": true,
|
||||
"description": "The name of the device is being linked. This name will be shown in Signal as device."
|
||||
}
|
||||
],
|
||||
"description": "Returns a QR-Code image. In case of an error a JSON object will be returned. Due to security reason of Signal, the provided QR-Code will change with each request.",
|
||||
"produces": [
|
||||
"image/png".
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
@@ -179,9 +189,14 @@ var doc = `{
|
||||
"summary": "Link device and generate QR code.",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Image",
|
||||
"description": "Ok",
|
||||
"content":
|
||||
"image"
|
||||
},
|
||||
"400": {
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
"$ref": "#/definitions/api.Error"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user