implemented Login and Register requests

This commit is contained in:
2025-11-18 23:07:31 +05:00
parent 23c98e14df
commit 806f0359d0
19 changed files with 395 additions and 147 deletions

View File

@@ -93,7 +93,6 @@ Result(void) LoginRequest_tryConstruct(LoginRequest *ptr, PacketHeader* header,
Return RESULT_ERROR(username_check_error.data, false);
}
memcpy(ptr->username, username.data, username.size);
ptr->username[username.size] = 0;
try_assert(token.size == sizeof(ptr->token));
memcpy(ptr->token, token.data, token.size);
@@ -123,7 +122,6 @@ Result(void) RegisterRequest_tryConstruct(RegisterRequest *ptr, PacketHeader* he
Return RESULT_ERROR(username_check_error.data, false);
}
memcpy(ptr->username, username.data, username.size);
ptr->username[username.size] = 0;
try_assert(token.size == sizeof(ptr->token));
memcpy(ptr->token, token.data, token.size);