=s.user_id WHERE s.token=?' );
$sth->execute( ref($c) ? ( $c->req->param('session') // $c->req->json->{session} ) : $c );
if ( my $row = $sth->fetchrow_hashref ) {
my $sth2 = $db->prepare( 'UPD
e/init' )->to(
cb => sub ( $c ) {
my $blank = Story::Interact::State->new;
$c->render( json => { state => $blank->dump } );
},
)->name( 'api-state-init' );
}
# API endpoint to read
= $story_config->{data_munge} // sub {};
my $state = Story::Interact::State->load( $c->req->json( '/state' ) );
$munge_state->( $c, $state );
if ( $page_id =~ /\A(.+)\?(.+)\z/ms ) {