refactor(api-server): narrow puzzle state surface
This commit is contained in:
@@ -4,7 +4,7 @@ use serde_json::{Value, json};
|
||||
use crate::{
|
||||
auth::AuthenticatedAccessToken,
|
||||
request_context::RequestContext,
|
||||
state::AppState,
|
||||
state::{AppState, PuzzleApiState},
|
||||
tracking::{TrackingEventDraft, record_tracking_event_after_success},
|
||||
};
|
||||
|
||||
@@ -68,6 +68,22 @@ pub(crate) async fn record_work_play_start_after_success(
|
||||
state: &AppState,
|
||||
request_context: &RequestContext,
|
||||
draft: WorkPlayTrackingDraft,
|
||||
) {
|
||||
record_work_play_start_input_after_success(state, request_context, draft).await;
|
||||
}
|
||||
|
||||
pub(crate) async fn record_puzzle_work_play_start_after_success(
|
||||
state: &PuzzleApiState,
|
||||
request_context: &RequestContext,
|
||||
draft: WorkPlayTrackingDraft,
|
||||
) {
|
||||
record_work_play_start_input_after_success(state.root_state(), request_context, draft).await;
|
||||
}
|
||||
|
||||
async fn record_work_play_start_input_after_success(
|
||||
state: &AppState,
|
||||
request_context: &RequestContext,
|
||||
draft: WorkPlayTrackingDraft,
|
||||
) {
|
||||
let mut metadata = json!({
|
||||
"operation": WORK_PLAY_START_EVENT_KEY,
|
||||
|
||||
Reference in New Issue
Block a user