@@ -25,32 +25,10 @@ const MAX_BANNER_UPLOAD_SIZE: i64 = util::file_size::megabytes(10) as i64;
25
25
// MARK: GET /games
26
26
pub async fn list (
27
27
ctx : Ctx < Auth > ,
28
- watch_index : WatchIndexQuery ,
28
+ _watch_index : WatchIndexQuery ,
29
29
) -> GlobalResult < models:: CloudGamesGetGamesResponse > {
30
30
let accessible_games = ctx. auth ( ) . accessible_games ( ctx. op_ctx ( ) ) . await ?;
31
31
32
- // Wait for an update if needed
33
- let update_ts = if let Some ( anchor) = watch_index. to_consumer ( ) ? {
34
- // Error if a cloud token tries to watch this endpoint, game update
35
- // messages for teams aren't implemented
36
- if let Some ( user_id) = accessible_games. user_id {
37
- let game_update_sub = tail_anchor ! ( [ ctx, anchor] user:: msg:: game_update( user_id) ) ;
38
-
39
- util:: macros:: select_with_timeout!( {
40
- event = game_update_sub => {
41
- let event = event?;
42
-
43
- event. msg_ts( )
44
- }
45
- } )
46
- } else {
47
- bail_with ! ( API_FORBIDDEN , reason = "Cloud token cannot watch `/games`" ) ;
48
- }
49
- } else {
50
- Default :: default ( )
51
- } ;
52
- let update_ts = update_ts. unwrap_or_else ( util:: timestamp:: now) ;
53
-
54
32
let games = fetch:: game:: summaries ( ctx. op_ctx ( ) , accessible_games. game_ids ) . await ?;
55
33
let groups = fetch:: group:: summaries (
56
34
ctx. op_ctx ( ) ,
@@ -62,7 +40,7 @@ pub async fn list(
62
40
Ok ( models:: CloudGamesGetGamesResponse {
63
41
games,
64
42
groups,
65
- watch : WatchResponse :: new_as_model ( update_ts ) ,
43
+ watch : WatchResponse :: new_as_model ( util :: timestamp :: now ( ) ) ,
66
44
} )
67
45
}
68
46
0 commit comments