simplify QR code generation in WASM presentation logic
All checks were successful
Dynamic Branch Deploy / build-and-deploy (push) Successful in 1m58s
All checks were successful
Dynamic Branch Deploy / build-and-deploy (push) Successful in 1m58s
This commit is contained in:
@@ -11,10 +11,7 @@ import (
|
||||
)
|
||||
|
||||
func (g *Game) notifyPresentationStarted_Platform(roomID string) {
|
||||
// Im WASM: QR Code aus dem Game-Struct nehmen
|
||||
var qrData []byte
|
||||
// Wir generieren den QR Code hier nochmal als PNG Bytes oder wir speichern die Bytes im Game Struct
|
||||
// Der Einfachheit halber generieren wir ihn in Go und übergeben ihn.
|
||||
// Wir generieren den QR Code hier als PNG Bytes.
|
||||
joinURL := "https://escape-from-school.de/?room=" + roomID
|
||||
pngData, _ := qrcode.Encode(joinURL, qrcode.Medium, 256)
|
||||
g.notifyPresentationStarted(roomID, pngData)
|
||||
|
||||
Reference in New Issue
Block a user