Code Monkey home page Code Monkey logo

deno-web-development's Issues

Check login request body

const { username, password } = await ctx.request.body().value;

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.

Typescript run time errors with jwt dependency

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.