Use Text instead of String
This commit is contained in:
parent
5ecf9864d3
commit
8428d3bbbf
1 changed files with 7 additions and 3 deletions
|
|
@ -7,6 +7,7 @@
|
||||||
module EuphApi.Types
|
module EuphApi.Types
|
||||||
( Snowflake
|
( Snowflake
|
||||||
, SessionID
|
, SessionID
|
||||||
|
, Nick
|
||||||
, UserID(..)
|
, UserID(..)
|
||||||
, UserType(..)
|
, UserType(..)
|
||||||
, Message(..)
|
, Message(..)
|
||||||
|
|
@ -29,6 +30,9 @@ type Snowflake = T.Text
|
||||||
-- | ID of a session, unique across all sessions globally.
|
-- | ID of a session, unique across all sessions globally.
|
||||||
type SessionID = T.Text
|
type SessionID = T.Text
|
||||||
|
|
||||||
|
-- | Nick of a user.
|
||||||
|
type Nick = T.Text
|
||||||
|
|
||||||
-- | Represents <http://api.euphoria.io/#userid>.
|
-- | Represents <http://api.euphoria.io/#userid>.
|
||||||
--
|
--
|
||||||
-- A 'UserID' identifies a user.
|
-- A 'UserID' identifies a user.
|
||||||
|
|
@ -120,9 +124,9 @@ instance FromJSON Message where
|
||||||
-- The fields @client_address@ and @real_client_address@ are not implemented.
|
-- The fields @client_address@ and @real_client_address@ are not implemented.
|
||||||
data SessionView = SessionView
|
data SessionView = SessionView
|
||||||
{ sessID :: UserID
|
{ sessID :: UserID
|
||||||
, sessName :: String
|
, sessName :: Nick
|
||||||
, sessServerID :: String
|
, sessServerID :: T.Text
|
||||||
, sessServerEra :: String
|
, sessServerEra :: T.Text
|
||||||
, sessSessionID :: SessionID
|
, sessSessionID :: SessionID
|
||||||
, isStaff :: Bool
|
, isStaff :: Bool
|
||||||
, isManager :: Bool
|
, isManager :: Bool
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue