diff options
| author | adambrangenberg <adabran06@gmail.com> | 2025-12-24 05:09:10 +0100 |
|---|---|---|
| committer | adambrangenberg <adabran06@gmail.com> | 2025-12-24 05:09:10 +0100 |
| commit | 34cba7d0f9faffe7b97692ccc6b3402fced63cbb (patch) | |
| tree | a638fb60eb4899a427f21f13ab2d497bf5fd3e6e /src/Endpoints/ProfileEndpoint.hs | |
| parent | a0886694f73fc382d78da79ab8bfb27475757bab (diff) | |
Refactor
Diffstat (limited to 'src/Endpoints/ProfileEndpoint.hs')
| -rw-r--r-- | src/Endpoints/ProfileEndpoint.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Endpoints/ProfileEndpoint.hs b/src/Endpoints/ProfileEndpoint.hs index 8aaaa52..3b04a02 100644 --- a/src/Endpoints/ProfileEndpoint.hs +++ b/src/Endpoints/ProfileEndpoint.hs @@ -6,7 +6,7 @@ module Endpoints.ProfileEndpoint (ProfileAPI, profileServer) where import Servant import Data.Aeson -import Data.Text (Text, pack) +import Data.Text (Text) import qualified Data.Text as T import Database.Persist import Database (runDb) @@ -34,11 +34,11 @@ handleProfileGet user_id = do case maybe_user of Just (Entity _ db_user) -> return $ ProfileResponse - { display_name = (userDisplayName db_user) <> (Just $ userIdent $ db_user) + { display_name = (userDisplayName db_user) , avatar_url = userAvatarUrl db_user , tz = Nothing } Nothing -> throwError err404 { errBody = encode user_not_found_error } where - user_not_found_error = (MatrixErrorResponse (pack "M_NOT_FOUND") (pack "Profile not found"))
\ No newline at end of file + user_not_found_error = (MatrixErrorResponse "M_NOT_FOUND" "Profile not found")
\ No newline at end of file |