diff options
author | Santo Cariotti <santo@dcariotti.me> | 2024-10-20 22:21:24 +0200 |
---|---|---|
committer | Santo Cariotti <santo@dcariotti.me> | 2024-10-20 22:21:24 +0200 |
commit | c4175e0b74f7c2d2ec5e0687e8a65e12afcd9067 (patch) | |
tree | 19cd088ebdd7b4db4ea2aa1fc7bc78ee03dff4a2 | |
parent | 328bb0344fc503f792059ba3e64b90ea1e2dc0af (diff) |
Fix new position creation time
-rw-r--r-- | src/graphql/types/position.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/graphql/types/position.rs b/src/graphql/types/position.rs index 3d0c38f..35d448d 100644 --- a/src/graphql/types/position.rs +++ b/src/graphql/types/position.rs @@ -237,7 +237,8 @@ pub mod mutations { client.query( "UPDATE positions SET location = ST_SetSRID(ST_MakePoint($1, $2), 4326), - activity = $3 + activity = $3, + created_at = now() WHERE user_id = $4 RETURNING id, user_id, extract(epoch from created_at)::double precision as created_at, ST_Y(location::geometry) AS latitude, ST_X(location::geometry) AS longitude, activity ", |