Compare commits
No commits in common. "9b523f082f2002e36ce8fcf13cf083afab67c45b" and "78379aea1b2dc41a9109d260f99f2d55f6459da4" have entirely different histories.
9b523f082f
...
78379aea1b
@ -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", function() {router(location.pathname)});
|
||||
window.addEventListener("popstate", router);
|
||||
|
||||
document.addEventListener("DOMContentLoaded", () => {
|
||||
document.body.addEventListener("click", e => {
|
||||
|
@ -17,7 +17,7 @@ class ProfileViewSet(viewsets.ModelViewSet):
|
||||
permission_classes = (permissions.IsAuthenticatedOrReadOnly,)
|
||||
|
||||
def retrieve(self, request: HttpRequest, pk=None):
|
||||
instance = ProfileModel.objects.get(pk=pk)
|
||||
instance = self.get_object()
|
||||
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)
|
||||
|
Loading…
Reference in New Issue
Block a user