Fix event bug
This commit is contained in:
parent
1471cc1ba8
commit
a93ea189c0
@ -58,7 +58,7 @@ let updateSlotPlayedFromPlayer (did : uint64) =
|
||||
|> Sql.query """
|
||||
WITH usr AS (SELECT id FROM "user" WHERE discord_id = @did)
|
||||
UPDATE player_event SET updated_at = now() at time zone 'utc'
|
||||
FROM usr WHERE usr.id = user_id;
|
||||
FROM usr WHERE usr.id = user_id AND player_event.event_type = 'PlayingSlot';
|
||||
"""
|
||||
|> Sql.executeNonQueryAsync
|
||||
|> Async.AwaitTask
|
||||
@ -250,7 +250,7 @@ let addPlayerEvent (did : uint64) (playerEvent : PlayerEvent) =
|
||||
"""
|
||||
WITH usr AS (SELECT id FROM "user" WHERE discord_id = @did)
|
||||
INSERT INTO player_event (event_type, cooldown, user_id)
|
||||
SELECT 'Imprison', 1, usr.id FROM usr
|
||||
SELECT 'PlayingSlot', 1, usr.id FROM usr
|
||||
"""
|
||||
| Imprison ->
|
||||
[
|
||||
|
Loading…
x
Reference in New Issue
Block a user