Skip to content

pranjaldube/IITK-coin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SnT summer project

IITK-coin

endpoins :-

For user auth

POST req at "http://localhost:8080/signin" for signin
Example req
{
"roll_no" : "190460" ,
"password" : "pass"
}

POST req at "http://localhost:8080/signup" for registring a new user
Example req
{
"roll_no" : "190460" ,
"password" : "pass"
}

GET req at "http://localhost:8080/secretpage"
Add JWT token in the header of req...
Example req
{
"Authorization" : "token_string"
}

For currency transactions :-

POST req at "http://localhost:8080/init"
To award an amount to a roll number if the roll no had an account
Else if no account is present then an account is created in the DB and amount is added
Example req
{
"roll_no" : "190460" ,
"balance" : 1000
}

POST req at "http://localhost:8080/transfer"
To transfer an amount from one roll number to another if the transaction is valid
Example req

{
"from_roll_no" : "190981" ,
"to_roll_no" : "190982",
"amount" : 1000
}

GET req at "http://localhost:8080/balance"

Example req
{
"roll_no" : "190460"

}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published