mirror of
https://github.com/simplex-chat/simplexmq.git
synced 2026-10-22 17:32:16 +00:00
add JSON instances for SwitchPhase (#552)
This commit is contained in:
1 parent
8d9816809f
commit
561649a498
1 file changed
+7
@@ -360,6 +360,13 @@ instance StrEncoding SwitchPhase where
|
||||
"completed" -> pure SPCompleted
|
||||
_ -> fail "bad SwitchPhase"
|
||||
|
||||
instance ToJSON SwitchPhase where
|
||||
toEncoding = strToJEncoding
|
||||
toJSON = strToJSON
|
||||
|
||||
instance FromJSON SwitchPhase where
|
||||
parseJSON = strParseJSON "SwitchPhase"
|
||||
|
||||
data ConnectionStats = ConnectionStats
|
||||
{ rcvServers :: [SMPServer],
|
||||
sndServers :: [SMPServer]
|
||||
|
||||
Reference in new issue
Block a user