From 4b3b562347154a85ae3dd50118b18be5aa7a7506 Mon Sep 17 00:00:00 2001 From: Guillem Nieto Date: Tue, 26 May 2020 21:06:54 +0200 Subject: [PATCH] Get device_id from body instead of auth data Device_id was retrieved from the auth data instead of login's body and this was causing that a new device was created on every login. This is (I guess) provoking that some sytests are failing (for example, "POST /login returns the same device_id as that in the request"). --- src/client_server.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/client_server.rs b/src/client_server.rs index cf858b4..1cbb839 100644 --- a/src/client_server.rs +++ b/src/client_server.rs @@ -293,6 +293,7 @@ pub fn login_route( // Generate new device id if the user didn't specify one let device_id = body + .body .device_id .unwrap_or_else(|| utils::random_string(DEVICE_ID_LENGTH));