Coder Social home page Coder Social logo

go-bank's Introduction

       Welcome to my profile

What do I do?


📝 Open Source Docs Posts:

📚 Latest Blog Posts:


👨‍💻 About me:

I'm a budding backend developer who specializes in designing and building scalable and robust backend systems. I create content and write tech blogs and contribute to open source. I am a community person and currently I am leading Google Developers Club at my University.

🔗 Reach out to me on:

go-bank's People

Contributors

adarsh-jaiss avatar

Watchers

 avatar

go-bank's Issues

Bug : Unable to insert user details

  • Unable to insert last_name in the Users Table during account creation, even though Insert function is working fine and APi is parsing the JSON request

Possible solution:

  • Maybe that's the Postgress container version error, need to update it
  • Debug the API parsing request
  • Debug the SQL Query

Database seed not working

Undefined behaviour

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x4cba54]

goroutine 1 [running]:
database/sql.(*DB).conn(0x0, {0x6c8e30, 0x851720}, 0x1)
        /usr/local/go/src/database/sql/sql.go:1282 +0x54
database/sql.(*DB).exec(0x22?, {0x6c8e30, 0x851720}, {0x670752, 0x160}, {0x0, 0x0, 0x0}, 0x20?)
        /usr/local/go/src/database/sql/sql.go:1651 +0x57
database/sql.(*DB).ExecContext.func1(0xd0?)
        /usr/local/go/src/database/sql/sql.go:1634 +0x4f
database/sql.(*DB).retry(0xc00002c140?, 0xc0000b9d80)
        /usr/local/go/src/database/sql/sql.go:1538 +0x42
database/sql.(*DB).ExecContext(0x651ea0?, {0x6c8e30?, 0x851720?}, {0x670752?, 0xc000052028?}, {0x0?, 0x22?, 0x198?})
        /usr/local/go/src/database/sql/sql.go:1633 +0xc8
database/sql.(*DB).Exec(...)
        /usr/local/go/src/database/sql/sql.go:1647
main.Createtable()
        /home/adarsh/myfiles/backend/Final projects/Go-bank/seeding/seed.go:163 +0x45
main.main()
        /home/adarsh/myfiles/backend/Final projects/Go-bank/seeding/seed.go:64 +0xf6
exit status 2
make: *** [Makefile:10: seed] Error 1

bug: Unable to update user details

json error :

{
  "error": "Failed to update user"
}

for the request query : http://localhost:8080/api/v1/user/update?account_number=100000000000002
and request body :

{
  "last_name":"jaiswal"
}

solution : debug the latest commit 25768b5 for more details

bug : Authentication throwing invalid token error

  • user Authentication throwing invalid token error, even if everthing is perfect
    image

  • After removing abort function from the JWT Authentication function, this is the response :

image

and these are server logs :

Token found in the header
NEVER PRINT SECRET eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6ImR1bW15X3VzZXIiLCJyb2xlIjoiYWRtaW4ifQ.KvN2yvobSh2PCgLbWCB9P8J9T7jV_q4gJ8P8vCzkn14
token parsed! ---------------->>>>>>>>
code fat rha hai bhai!!!!!!!!!:
{[email protected] adarsh@123}
email found!
auth params password :adarsh@123
user password :adarsh@123
password matched!
token from auth_handler.go:  eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6ImFkYXJzaEBnbWFpbC5jb20iLCJleHBpcmVzIjoxNzExMDQ2MzUxfQ.DPs_PQ5383fwmCIqsED1Y5yyv5MMjm3HJ4mw7DC6buw
token created!
[GIN-debug] [WARNING] Headers were already written. Wanted to override status code 401 with 200
response sent!

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.