From 5218187d6d83f7e83a90aa3037cf9c604affdb33 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Sat, 21 Dec 2024 17:30:21 +0300 Subject: [PATCH] fix: icon encoding --- selfprivacy_api/services/templated_service.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/selfprivacy_api/services/templated_service.py b/selfprivacy_api/services/templated_service.py index f91d9b2..20549a3 100644 --- a/selfprivacy_api/services/templated_service.py +++ b/selfprivacy_api/services/templated_service.py @@ -1,5 +1,6 @@ """A Service implementation that loads all needed data from a JSON file""" +import base64 from enum import Enum import json import subprocess @@ -373,7 +374,7 @@ class TemplatedService(Service): return self.meta.description def get_svg_icon(self) -> str: - return self.meta.svg_icon + return base64.b64encode(self.meta.svg_icon.encode("utf-8")).decode("utf-8") def get_subdomain(self) -> Optional[str]: # If there are no subdomain options, return None