@@ -119,11 +119,8 @@ public ApiOkResponse SetLevelAsOverrideById(RequestContext context,
119119 GameDatabaseContext database ,
120120 GameUser user ,
121121 PlayNowService overrideService ,
122- [ DocSummary ( "The ID of the level" ) ] int id , GameServerConfig config )
122+ [ DocSummary ( "The ID of the level" ) ] int id )
123123 {
124- if ( user . IsWriteBlocked ( config ) )
125- return ApiAuthenticationError . ReadOnlyError ;
126-
127124 GameLevel ? level = database . GetLevelById ( id ) ;
128125 if ( level == null ) return ApiNotFoundError . LevelMissingError ;
129126
@@ -139,11 +136,8 @@ public ApiOkResponse SetLevelAsOverrideById(RequestContext context,
139136 [ RateLimitSettings ( LevelOverrideEndpointLimits . TimeoutDuration , LevelOverrideEndpointLimits . RequestAmount ,
140137 LevelOverrideEndpointLimits . BlockDuration , LevelOverrideEndpointLimits . RequestBucket ) ]
141138 public ApiOkResponse SetLevelAsOverrideByHash ( RequestContext context , GameDatabaseContext database , GameUser user ,
142- PlayNowService service , PresenceService presenceService , [ DocSummary ( "The hash of level root resource" ) ] string hash , GameServerConfig config )
139+ PlayNowService service , PresenceService presenceService , [ DocSummary ( "The hash of level root resource" ) ] string hash )
143140 {
144- if ( user . IsWriteBlocked ( config ) )
145- return ApiAuthenticationError . ReadOnlyError ;
146-
147141 if ( ! CommonPatterns . Sha1Regex ( ) . IsMatch ( hash ) )
148142 return ApiValidationError . HashInvalidError ;
149143
@@ -172,7 +166,7 @@ public ApiResponse<ApiGameLevelOwnRelationsResponse> GetLevelRelationsOfUser(Req
172166 [ DocError ( typeof ( ApiNotFoundError ) , ApiNotFoundError . LevelMissingErrorWhen ) ]
173167 [ RateLimitSettings ( CommonRelationEndpointLimits . TimeoutDuration , CommonRelationEndpointLimits . RequestAmount ,
174168 CommonRelationEndpointLimits . BlockDuration , CommonRelationEndpointLimits . RequestBucket ) ]
175- public ApiOkResponse FavouriteLevel ( RequestContext context , GameDatabaseContext database , GameUser user ,
169+ public ApiOkResponse HeartLevel ( RequestContext context , GameDatabaseContext database , GameUser user ,
176170 [ DocSummary ( "The ID of the level" ) ] int id , DataContext dataContext , GameServerConfig config )
177171 {
178172 if ( user . IsWriteBlocked ( config ) )
@@ -211,11 +205,8 @@ public ApiOkResponse UnheartLevel(RequestContext context, GameDatabaseContext da
211205 [ RateLimitSettings ( CommonRelationEndpointLimits . TimeoutDuration , CommonRelationEndpointLimits . RequestAmount ,
212206 CommonRelationEndpointLimits . BlockDuration , CommonRelationEndpointLimits . RequestBucket ) ]
213207 public ApiOkResponse QueueLevel ( RequestContext context , GameDatabaseContext database , GameUser user ,
214- [ DocSummary ( "The ID of the level" ) ] int id , DataContext dataContext , GameServerConfig config )
208+ [ DocSummary ( "The ID of the level" ) ] int id , DataContext dataContext )
215209 {
216- if ( user . IsWriteBlocked ( config ) )
217- return ApiAuthenticationError . ReadOnlyError ;
218-
219210 GameLevel ? level = database . GetLevelById ( id ) ;
220211 if ( level == null ) return ApiNotFoundError . LevelMissingError ;
221212
@@ -236,11 +227,8 @@ public ApiOkResponse QueueLevel(RequestContext context, GameDatabaseContext data
236227 [ RateLimitSettings ( CommonRelationEndpointLimits . TimeoutDuration , CommonRelationEndpointLimits . RequestAmount ,
237228 CommonRelationEndpointLimits . BlockDuration , CommonRelationEndpointLimits . RequestBucket ) ]
238229 public ApiOkResponse DequeueLevel ( RequestContext context , GameDatabaseContext database , GameUser user ,
239- [ DocSummary ( "The ID of the level" ) ] int id , DataContext dataContext , GameServerConfig config )
230+ [ DocSummary ( "The ID of the level" ) ] int id , DataContext dataContext )
240231 {
241- if ( user . IsWriteBlocked ( config ) )
242- return ApiAuthenticationError . ReadOnlyError ;
243-
244232 GameLevel ? level = database . GetLevelById ( id ) ;
245233 if ( level == null ) return ApiNotFoundError . LevelMissingError ;
246234
@@ -254,11 +242,8 @@ public ApiOkResponse DequeueLevel(RequestContext context, GameDatabaseContext da
254242 [ RateLimitSettings ( CommonRelationEndpointLimits . TimeoutDuration , CommonRelationEndpointLimits . RequestAmount ,
255243 CommonRelationEndpointLimits . BlockDuration , CommonRelationEndpointLimits . RequestBucket ) ]
256244 public ApiOkResponse ClearQueuedLevels ( RequestContext context , GameDatabaseContext database ,
257- IDataStore dataStore , GameUser user , DataContext dataContext , GameServerConfig config )
245+ GameUser user , DataContext dataContext )
258246 {
259- if ( user . IsWriteBlocked ( config ) )
260- return ApiAuthenticationError . ReadOnlyError ;
261-
262247 database . ClearQueue ( user ) ;
263248 dataContext . Cache . ClearQueueByUser ( user ) ;
264249 return new ApiOkResponse ( ) ;
0 commit comments