Add GET /mimi to zoo
Proving to my girlfriend that the zoo works.
This commit is contained in:
		
							parent
							
								
									309c5452e1
								
							
						
					
					
						commit
						ace08853e0
					
				
					 1 changed files with 5 additions and 1 deletions
				
			
		|  | @ -18,9 +18,11 @@ import qualified Network.Wai.Handler.Warp as Warp | ||||||
| type Api = "run" | type Api = "run" | ||||||
|            :> QueryParam' '[Required] "offset" Text |            :> QueryParam' '[Required] "offset" Text | ||||||
|            :> Get '[JSON] UTCTime |            :> Get '[JSON] UTCTime | ||||||
|  |       :<|> "mimi" | ||||||
|  |            :> Get '[JSON] Text | ||||||
| 
 | 
 | ||||||
| server :: Server Api | server :: Server Api | ||||||
| server = compute | server = compute :<|> helloMimi | ||||||
|   where |   where | ||||||
|     compute :: Text -> Handler UTCTime |     compute :: Text -> Handler UTCTime | ||||||
|     compute x = do |     compute x = do | ||||||
|  | @ -29,6 +31,8 @@ server = compute | ||||||
|         Just req -> do |         Just req -> do | ||||||
|           res <- liftIO $ shiftTime req |           res <- liftIO $ shiftTime req | ||||||
|           pure res |           pure res | ||||||
|  |     helloMimi :: Handler Text | ||||||
|  |     helloMimi = pure "Hello, Mimi" | ||||||
| 
 | 
 | ||||||
| data ShiftTimeRequest = ShiftTimeRequest | data ShiftTimeRequest = ShiftTimeRequest | ||||||
|   { shiftSeconds :: Int |   { shiftSeconds :: Int | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue