在 Yesod 路由中发送 ID 列表
Send list of IDs in Yesod route
我想在我的 Yesod 应用程序中有一个接受 ID 列表的路线
从 this page 看来,您可以在路线中使用 * 来接受列表,但是当我尝试这样做时
/api/user/#UserId UserR GET DELETE
/api/users/display/*UserIds DisplayR GET
我收到错误
Not in scope: type constructor or class ‘UserIds’
Perhaps you meant one of these:
‘UserId’ (imported from Import.NoFoundation),
我如何接受路由中的 UserId 列表?
路线需要
/api/users/display/*[UserId] DisplayR GET
然后Handler需要取输入类型[UserId]
我想在我的 Yesod 应用程序中有一个接受 ID 列表的路线
从 this page 看来,您可以在路线中使用 * 来接受列表,但是当我尝试这样做时
/api/user/#UserId UserR GET DELETE
/api/users/display/*UserIds DisplayR GET
我收到错误
Not in scope: type constructor or class ‘UserIds’
Perhaps you meant one of these:
‘UserId’ (imported from Import.NoFoundation),
我如何接受路由中的 UserId 列表?
路线需要
/api/users/display/*[UserId] DisplayR GET
然后Handler需要取输入类型[UserId]