From 34cba7d0f9faffe7b97692ccc6b3402fced63cbb Mon Sep 17 00:00:00 2001 From: adambrangenberg Date: Wed, 24 Dec 2025 05:09:10 +0100 Subject: Refactor --- src/Endpoints/ProfileEndpoint.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/Endpoints/ProfileEndpoint.hs') 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 -- cgit v1.2.3