packtpublishing / deno-web-development Goto Github PK
View Code? Open in Web Editor NEWDeno Web Development, published by Packt
License: MIT License
Deno Web Development, published by Packt
License: MIT License
Hi there,
If you open https://github.com/PacktPublishing/Deno-Web-Development/blob/master/Chapter06/sections/3-adding-authorization/museums-api/src/index.ts and run deno run -A index.ts
or deno run -A --unstable index.ts
, the following errors are thrown
error: TS2345 [ERROR]: Argument of type '"jwk"' is not assignable to parameter of type '"raw"'.
"jwk",
~~~~~
at https://deno.land/x/[email protected]/src/rsa/rsa_wc.ts:55:5
TS2345 [ERROR]: Argument of type '"jwk"' is not assignable to parameter of type '"raw"'.
"jwk",
~~~~~
at https://deno.land/x/[email protected]/src/rsa/rsa_wc.ts:55:5
TS2345 [ERROR]: Argument of type '"jwk"' is not assignable to parameter of type '"raw"'.
"jwk",
~~~~~
at https://deno.land/x/[email protected]/src/aes/aes_wc.ts:25:9
Found 3 errors.
Dear Alexandre santos @asantos00. Please check the previous line.
const { username, password } = await ctx.request.body().value;
I was not able to execute the login in your book, because it was a little different than the register request body value.
I think it should be something like this:
const { username, password } = await ctx.request.body({ type: "json" }).value;
Once I modified that line, login worked. I used postman to make a test.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.