API: Refactor data URL encoding and decoding in pkg/media #127 #1090

Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
Michael Mayer
2025-04-09 10:58:48 +02:00
parent 7f1041c434
commit cf3b933e59
7 changed files with 128 additions and 85 deletions

View File

@@ -23,7 +23,7 @@ func (m *Passcode) MarshalJSON() ([]byte, error) {
UID: m.UID,
Type: m.KeyType,
Secret: m.Secret(),
QRCode: media.Base64(m.Png(350)),
QRCode: media.DataUrl(m.Png(350)),
RecoveryCode: m.RecoveryCode,
CreatedAt: m.CreatedAt,
UpdatedAt: m.UpdatedAt,