Compare commits

..

4 Commits

Author SHA1 Message Date
9b523f082f merge with server 2023-12-11 16:15:21 +01:00
982130a02f 🤓 2023-12-11 15:59:15 +01:00
85787760b9 fix: back button is back 2023-12-11 15:54:56 +01:00
2ccfc5464a fix: fix: + ratio 2023-12-11 15:23:42 +01:00
2 changed files with 3 additions and 3 deletions

View File

@ -33,7 +33,7 @@ const navigateTo = async (uri) => {
history.pushState(null, null, uri);
};
const router = async (uri = "") => {
const router = async (uri) => {
const routes = [
{ path: "/", view: Dashboard },
{ path: "/profiles", view: ProfilesView},
@ -86,7 +86,7 @@ const router = async (uri = "") => {
return 0;
};
window.addEventListener("popstate", router);
window.addEventListener("popstate", function() {router(location.pathname)});
document.addEventListener("DOMContentLoaded", () => {
document.body.addEventListener("click", e => {

View File

@ -17,7 +17,7 @@ class ProfileViewSet(viewsets.ModelViewSet):
permission_classes = (permissions.IsAuthenticatedOrReadOnly,)
def retrieve(self, request: HttpRequest, pk=None):
instance = self.get_object()
instance = ProfileModel.objects.get(pk=pk)
instance.avatar_url.name = instance.avatar_url.name[instance.avatar_url.name.find("static") - 1:]
return Response(self.serializer_class(instance).data,
status=status.HTTP_200_OK)