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/base64"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"errors"
|
"errors"
|
||||||
|
"os"
|
||||||
|
"os/exec"
|
||||||
|
"strings"
|
||||||
|
"time"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
uuid "github.com/gofrs/uuid"
|
uuid "github.com/gofrs/uuid"
|
||||||
"github.com/h2non/filetype"
|
"github.com/h2non/filetype"
|
||||||
log "github.com/sirupsen/logrus"
|
log "github.com/sirupsen/logrus"
|
||||||
qrcode "github.com/skip2/go-qrcode"
|
qrcode "github.com/skip2/go-qrcode"
|
||||||
"os"
|
|
||||||
"os/exec"
|
|
||||||
"strings"
|
|
||||||
"time"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
const groupPrefix = "group."
|
const groupPrefix = "group."
|
||||||
|
|||||||
@@ -169,8 +169,18 @@ var doc = `{
|
|||||||
},
|
},
|
||||||
"/v1/qrcodelink": {
|
"/v1/qrcodelink": {
|
||||||
"get": {
|
"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": [
|
"produces": [
|
||||||
|
"image/png".
|
||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
"tags": [
|
"tags": [
|
||||||
@@ -179,9 +189,14 @@ var doc = `{
|
|||||||
"summary": "Link device and generate QR code.",
|
"summary": "Link device and generate QR code.",
|
||||||
"responses": {
|
"responses": {
|
||||||
"200": {
|
"200": {
|
||||||
"description": "Image",
|
"description": "Ok",
|
||||||
|
"content":
|
||||||
|
"image"
|
||||||
|
},
|
||||||
|
"400": {
|
||||||
|
"description": "Bad Request",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "string"
|
"$ref": "#/definitions/api.Error"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user