mirror of
https://github.com/oxen-io/session-open-group-server.git
synced 2023-12-13 20:30:35 +01:00
Make upper bound a constant
This commit is contained in:
parent
95bbb32e8e
commit
bf3771aab2
1 changed files with 2 additions and 2 deletions
|
@ -128,8 +128,8 @@ pub async fn store_file(
|
|||
base64_encoded_bytes: &str, auth_token: Option<String>, pool: &storage::DatabaseConnectionPool,
|
||||
) -> Result<Response, Rejection> {
|
||||
// It'd be nice to use the UUID crate for the file ID, but clients want an integer ID
|
||||
let upper_bound = 2u64.pow(53); // JS has trouble if we go higher than this
|
||||
let id: u64 = thread_rng().gen_range(0..upper_bound);
|
||||
const UPPER_BOUND: u64 = 2u64.pow(53); // JS has trouble if we go higher than this
|
||||
let id: u64 = thread_rng().gen_range(0..UPPER_BOUND);
|
||||
let now = chrono::Utc::now().timestamp_nanos();
|
||||
// Check authorization level if needed
|
||||
match rpc::MODE {
|
||||
|
|
Loading…
Reference in a new issue