Trading card city builder game?

fixes

eldridge.cam 90007a14 0fffb057

verified
Waiting for spindle ...
+15 -7
+12 -3
app/src/lib/appserver/socket/SocketV1Protocol.ts
··· 126 126 }); 127 127 export type GameState = StaticDecode<typeof GameState>; 128 128 129 - export const Authenticate = Type.Object({ type: Type.Literal("Authenticate"), data: Type.String() }); 129 + export const Authenticate = Type.Object({ 130 + type: Type.Literal("Authenticate"), 131 + data: Type.String(), 132 + }); 130 133 export type Authenticate = StaticDecode<typeof Authenticate>; 131 134 132 135 export const ListFields = Type.Object({ type: Type.Literal("ListFields") }); ··· 138 141 export const Unsubscribe = Type.Object({ type: Type.Literal("Unsubscribe") }); 139 142 export type Unsubscribe = StaticDecode<typeof Unsubscribe>; 140 143 141 - export const DebugAddCard = Type.Object({ type: Type.Literal("DebugAddCard"), data: Type.String() }); 144 + export const DebugAddCard = Type.Object({ 145 + type: Type.Literal("DebugAddCard"), 146 + data: Type.String(), 147 + }); 142 148 export type DebugAddCard = StaticDecode<typeof DebugAddCard>; 143 149 144 150 export const Request = Type.Union([ ··· 159 165 export const PutState = Type.Object({ type: Type.Literal("PutState"), data: GameState }); 160 166 export type PutState = StaticDecode<typeof PutState>; 161 167 162 - export const PatchState = Type.Object({ type: Type.Literal("PatchState"), data: Type.Array(JsonPatch) }); 168 + export const PatchState = Type.Object({ 169 + type: Type.Literal("PatchState"), 170 + data: Type.Array(JsonPatch), 171 + }); 163 172 export type PatchState = StaticDecode<typeof PatchState>; 164 173 165 174 export const Response = Type.Union([Authenticated, FieldList, PutState, PatchState]);
+2 -4
src/actor/player_socket/mod.rs
··· 67 67 ) -> Self::Reply { 68 68 let result = match request { 69 69 Request::Authenticate(account_id) => self.authenticate(tx, account_id).await, 70 - Request::ListFields if self.account_id.is_some() => { 71 - self.list_fields(tx).await 72 - } 73 - _ => Err(anyhow::anyhow!("authentication required")) 70 + Request::ListFields if self.account_id.is_some() => self.list_fields(tx).await, 71 + _ => Err(anyhow::anyhow!("authentication required")), 74 72 }; 75 73 if let Err(error) = result { 76 74 tracing::error!("error handling player socket message: {}", error);
+1
src/db.rs
··· 4 4 #[derive(sqlx::Type)] 5 5 #[sqlx(type_name = "card_class", rename_all = "lowercase")] 6 6 #[derive(Serialize, Deserialize, PartialEq, Eq, Hash, Clone, Copy, Debug, ToSchema)] 7 + #[expect(dead_code)] 7 8 pub enum CardClass { 8 9 Tile, 9 10 Citizen,