webshop_userdatabase's People
webshop_userdatabase's Issues
Skapa PUT /users/update
Headers: x-auth-token: TOKEN-String
Request: {
name: string
email: string
password: string
homeadress: string
postnumber: string
city: string
}
Response: 200 OK
Skapa POST /login
POST /login
Request: JSON objekt med userinfo
{
email: string
password: string
}
Response:
{
x-auth-token: TOKEN-String
}
Skapa Register user: POST /users
Request:{
name: string
email: string
password: string
homeadress: string
postnumber: string
city: String
}
Response
{
x-auth-token: TOKEN-String
}
Response: 200 OK
Få connection mellan APIn och databasen
POST /login problem
Dokumentation säger att man bör skicka över email och password i json för att få token. För tillfället fungerar det inte, istället om man skickar namn och password fungerar det.
Fungerar inte:
{
"email":"[email protected]",
"password":"password"
}
Fungerar:
{
"email":"namn",
"password":"password"
}
Få igång en basic API
Skapa en DB enligt bestämda model!
Få Heroku / Github automatic deploy att fungera!
Skapa getUserID för orders
Orders vill kunna få tag i userID för att hålla koll på vem som har gjort vilken order
Skapa GET /user
Headers: x-auth-token: TOKEN-String
Response {
name: string
email: string
homeadress: string
postnummer: string
city: string
}
POST /login response
Dokumentationen säger att json responsens key är "x-auth-token" egentliga key är "x_auth_token". På frontenden har jag för tillfället den och fungera tillsammans med "x_auth_token". Tänker ni ändra respons eller dokumentation?
Skapa API enligt bestämd model!
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.