Skip to content

Commit

Permalink
Fix logout error + improve mark edition
Browse files Browse the repository at this point in the history
  • Loading branch information
KwikKill committed Oct 15, 2024
1 parent 69dc7d1 commit e41463e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
8 changes: 6 additions & 2 deletions backend/langate/user/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,13 +277,17 @@ class UserLogout(APIView):
API endpoint that allows a user to logout.
"""

permission_classes = [permissions.IsAuthenticated]
authentication_classes = [SessionAuthentication]
permission_classes = [permissions.AllowAny]
authentication_classes = []

def post(self, request):
"""
Will logout an user.
"""
# if the user is not authenticated, we return a 200 OK
if not request.user.is_authenticated:
return Response(status=status.HTTP_200_OK)

user_devices = UserDevice.objects.filter(user=request.user)
client_ip = request.META.get('HTTP_X_FORWARDED_FOR')

Expand Down
5 changes: 5 additions & 0 deletions frontend/src/views/Management/Marks.vue
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ const submitData = async () => {
await patch_marks(marksCopy.value);
// TODO: display a success message
console.log('Data submitted');

Check warning on line 37 in frontend/src/views/Management/Marks.vue

View workflow job for this annotation

GitHub Actions / ESLint Report Analysis

frontend/src/views/Management/Marks.vue#L37

[no-console] Unexpected console statement.
edit.value = false;
await fetch_marks();
// make a copy of the marks
marksCopy.value = marks.value.map((mark) => ({ ...mark }));
};
const reset = async () => {
Expand Down

0 comments on commit e41463e

Please sign in to comment.