Add a white border around the QR Image

This commit is contained in:
Danijel Fischer
2020-10-04 12:57:29 +02:00
parent 7e9c0a0653
commit 0dc5c0f4d7
2 changed files with 23 additions and 7 deletions

View File

@@ -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."

View File

@@ -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"
}
}
}