swackles / birkle Goto Github PK
View Code? Open in Web Editor NEWHome task for BirkleIT
Home task for BirkleIT
{
"Authorization": "mandatory; user auth token",
}
##Response
When token authentication failed
When time log with ID doesn't exist
{
"code": "code for the specific error",
"msg": "message for the specific error"
}
{
"id": "id of the timelog",
"description": "description for the timelog",
"startTime": "2012-04-23T18:25:43.511Z",
"endTime": "2012-04-23T18:25:43.511Z"
}
This method will be a number input and each number will represent an error and then return a JSON object.
{
"code": "code for the specific error",
"msg": "message for the specific error"
}
Timelog with this id doesn't exist
Timelog is still ongoing
There's an already existing time range that overlaps
The mandatory field is missing
User already exists
{
"Authorization": "mandatory; user auth token",
}
{
"description": "description for the timelog",
"startTime": "2012-04-23T18:25:43.511Z",
"endTime": "2012-04-23T18:25:43.511Z",
}
##Response
When token authentication failed
{
"code": "code for the specific error",
"msg": "message for the specific error"
}
{
"id": "id for the time log"
}
{
"Authorization": "mandatory; user auth token",
}
{
"endTime": "2012-04-23T18:25:43.511Z"
}
##Response
When token authentication failed
{
"code": "code for the specific error",
"msg": "message for the specific error"
}
{
"id": "id for the time log"
}
{
"Authorization": "mandatory; user auth token",
}
{
"description": "mandatory; description for the timelog",
"startTime": "mandatory; 2012-04-23T18:25:43.511Z",
"endTime": "2012-04-23T18:25:43.511Z",
}
##Response
When token authentication failed
{
"code": "code for the specific error",
"msg": "message for the specific error"
}
{
"id": "id for the time log"
}
Authentication middleware that checks token in the header is valid. If valid then uses next if not then returns a correct error
{
"Authorization": "mandatory; user auth token",
}
##Response
When token authentication failed
When time log with ID doesn't exist
{
"code": "code for the specific error",
"msg": "message for the specific error"
}
{
"id": "id for the time log"
}
POST auth/register
{
"email": "Email of the user",
"password": "Password of the user",
"name": {
"forname": "First name of the user",
"surname": "Last name of the user"
}
}
All fields mandatory
{
"code": "code for the specific error",
"msg": "message for the specific error"
}
If registration is successful
{
"token": "Token for the user"
}
{
"Authorization": "mandatory; user auth token",
}
##Response
When token authentication failed
{
[
{
"id": "id of the timelog",
"description": "description for the timelog",
"startTime": "2012-04-23T18:25:43.511Z",
"endTime": "2012-04-23T18:25:43.511Z",
},
{
"id": "id of the timelog",
"description": "description for the timelog",
"startTime": "2012-04-23T18:25:43.511Z",
"endTime": "2012-04-23T18:25:43.511Z",
}
]
}
Create TS Express app base with Firebase dependency
POST auth/login
{
"email": "Email of the user",
"password": "Password of the user"
}
All fields mandatory
When authentication fails
If registration is successful
{
"token": "Token for the user"
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.