Skip to content
This repository has been archived by the owner on Feb 17, 2019. It is now read-only.

Latest commit

 

History

History
50 lines (38 loc) · 1.01 KB

index.md

File metadata and controls

50 lines (38 loc) · 1.01 KB

Mugs documentation

User model

{
	"id": MongoId,
	"email": String,
	"firstname": String,
	"lastname": String,
	"fullname": String,
	"password": String,
	"created": Date,
	"updated": Date,
	"confirmationToken": MongoId,
	"confirmed": Date,
	"resetPasswordToken": MongoId,
	"roles": [{ role: String, scope: String }],
	"data": {},
}

Permission model / roles

TBA.

REST API

Base response format

All endpoints wrap responses in a standard format:

{
    success: Boolean,
    code: Number,
    // will be defined if success === true
    result: Object | Array | null | undefined,
    // will be defined if success === false  
    error: Object | String | undefined          
}

Success

Success result is not required, but the definition of the key result in the response object is, if success === true. Results should be either an object, an array or null (thereby conforming to JSON in itself).

List of endpoints