public string DebugClearCachedWorld(int game_id) { BasicResponse response = new BasicResponse(); if (RestUtilities.ValidateJSONRequestHasAuthenticatedSession(Session, out response.result) && RestUtilities.ValidateJSONRequestSessionHasAdminOpsLevel(Session, out response.result)) { WorldCache.ClearWorld(Application, game_id); WorldBuilderCache.ClearWorldBuilder(Application); response.result = SuccessMessages.GENERAL_SUCCESS; } return(JSONUtilities.SerializeJSONResponse <BasicResponse>(response)); }
protected override bool ProcessRequestInternal( RequestCache requestCache, out string result_code) { bool success = false; result_code = SuccessMessages.GENERAL_SUCCESS; if (GameQueries.VerifyAccountOwnsGame(requestCache.DatabaseContext, m_account_id, m_game_id)) { GameQueries.DeleteGame(requestCache.DatabaseContext, m_game_id); WorldCache.ClearWorld(requestCache.SessionCache, m_game_id); success = true; } else { result_code = ErrorMessages.NOT_GAME_OWNER; } return(success); }