View: my_player - Returns the player for the caller
| 133 | |
| 134 | // View: my_player - Returns the player for the caller |
| 135 | SPACETIMEDB_VIEW(std::optional<Player>, my_player, Public, ViewContext ctx) { |
| 136 | auto player_opt = ctx.db[player_identity].find(ctx.sender()); |
| 137 | return player_opt; |
| 138 | } |
| 139 | |
| 140 | // View: my_player_and_level - Returns player with level joined |
| 141 | SPACETIMEDB_VIEW(std::optional<PlayerAndLevel>, my_player_and_level, Public, ViewContext ctx) { |