You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unfortunately, attempt to generate JS for this API does not typecheck. The error is:
app\Main.hs:24:14: error:
* No instance for (servant-foreign-0.15.4:Servant.Foreign.Internal.HasForeign
NoTypes NoContent StartTournamentApi)
arising from a use of `jsForAPI'
* In the expression:
jsForAPI (Proxy :: Proxy StartTournamentApi) jquery
In an equation for `js':
js = jsForAPI (Proxy :: Proxy StartTournamentApi) jquery
In the expression:
do let js = jsForAPI (Proxy :: Proxy StartTournamentApi) jquery
TIO.writeFile "static/js/api.js" js
|
24 | let js = jsForAPI (Proxy :: Proxy StartTournamentApi) jquery
I assume that js generator should completely ignore auth requirement because XMLHttpRequest sends cookies which are used for authentication.
The workaround I found is to create a following instance:
instanceHasForeignlangftypeapi=>HasForeignlangftype (Authauthsval:>api) wheretypeForeignftype (Authauthsval:>api) =Foreignftypeapi
foreignFor lang ftype Proxy= foreignFor lang ftype (Proxy::Proxyapi)
The text was updated successfully, but these errors were encountered:
I have an endpoint that looks approximately like this:
Unfortunately, attempt to generate JS for this API does not typecheck. The error is:
I assume that js generator should completely ignore auth requirement because XMLHttpRequest sends cookies which are used for authentication.
The workaround I found is to create a following instance:
The text was updated successfully, but these errors were encountered: