Skip to content

Latest commit

 

History

History
57 lines (49 loc) · 1.36 KB

README.md

File metadata and controls

57 lines (49 loc) · 1.36 KB

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"

}