Skip to content

Commit

Permalink
backend/fix/#100/added-bengali-to-language-data
Browse files Browse the repository at this point in the history
  • Loading branch information
S S Mercy Queen committed May 2, 2023
1 parent f8a7964 commit 83e9a44
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/mobility-core/src/Kernel/External/Types.hs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ data Language
| KANNADA
| TAMIL
| MALAYALAM
| BENGALI
deriving (Eq, Show, Ord, Read, Generic, ToJSON, FromJSON, ToParamSchema, ToSchema)
deriving (PrettyShow) via Showable Language

Expand All @@ -35,6 +36,7 @@ instance FromHttpApiData Language where
parseUrlPiece "kn" = pure KANNADA
parseUrlPiece "ml" = pure MALAYALAM
parseUrlPiece "ta" = pure TAMIL
parseUrlPiece "bn" = pure BENGALI
parseUrlPiece _ = Left "Unable to parse Language"

instance ToHttpApiData Language where
Expand All @@ -43,3 +45,4 @@ instance ToHttpApiData Language where
toUrlPiece KANNADA = "kn"
toUrlPiece MALAYALAM = "ml"
toUrlPiece TAMIL = "ta"
toUrlPiece BENGALI = "bn"

0 comments on commit 83e9a44

Please sign in to comment.