clean notification with last folder change
This commit is contained in:
@@ -2,7 +2,7 @@ const conf = require(`../../../../conf/townconf.json`);
|
||||
const currentmod='checkHeaders';
|
||||
const log = conf.api.activelog.includes(currentmod)
|
||||
/**
|
||||
* @api {get} http://header/CheckHeaders - CheckHeaders
|
||||
* @api {get} / - CheckHeaders
|
||||
* @apiGroup Middlewares
|
||||
* @apiName CheckHeaders
|
||||
* @apiDescription a list of headers are mandatory to access apxtri see in your space town /conf.json.exposedHeaders
|
||||
|
@@ -32,12 +32,18 @@ All others object are managed by spécifics tribe.
|
||||
/api
|
||||
/objects/objectname/idx/ # list of index to search objectname items
|
||||
/itms/ # 1 json per items name apxid.json where apxid is a unique key
|
||||
/wwws/idx/
|
||||
/itm/
|
||||
appname.json # website appname conf
|
||||
cdn.json
|
||||
/appname/ # website files
|
||||
/cdn/ # cached files to optimize nginx static file delivery
|
||||
|
||||
/schema/conf.json # list of schema and version
|
||||
/objectname.json # schema title and escription are in english
|
||||
/lg/objectname_lg.json # title and description in lg
|
||||
/www/appname # web space
|
||||
/cdn # common file with cache system
|
||||
/tribename/ # same than adminapi but wit /api instead of apxtri
|
||||
/tribename/ # same than adminapi for a specific tribe but wit /api instead of /apxtri,
|
||||
# we only have 1 node process that manage 1 town that manage many tribes api
|
||||
```
|
||||
|
||||
API Endpoint url: **/api/{tribename}/{routename}/xxx**
|
||||
@@ -88,14 +94,14 @@ See Pagans models that contain authentification process
|
||||
|
||||
A - data file from a classical get [https://wall-ants.ndda.fr/Checkjson.js](https://smatchit.io/Checkjson.js)
|
||||
|
||||
B - a json single answer {status, ref,msg,data}:
|
||||
B - a json single answer **{status, ref,msg,data}:**
|
||||
|
||||
* status: http code return
|
||||
* ref: model/route name reference where message come from
|
||||
* msg: a message template key store into models/lg/name\_lg.json (where lg is 2 letters language)
|
||||
* data: an object data use to render the value of the message key.
|
||||
|
||||
C - a json multi answer {status,multimsg:\[{ref,msg,data}\]}
|
||||
C - a json multi answer **{status,multimsg:\[{ref,msg,data}\]}**
|
||||
|
||||
Each {ref,msg,data\] work the same way than B
|
||||
|
||||
@@ -104,9 +110,9 @@ This contain a json {msg:"mustache template string to render with data"}
|
||||
|
||||
## Accessrights:
|
||||
|
||||
An alias is just an identity, to access a tribe, a person must exist with an authenticated alias into /tribes/{tribename}/persons/itm/{alias}.json/tribes/tribename/api/routes/
|
||||
An alias is just an identity, to access a tribe, a person must exist with an authenticated alias into /tribes/{tribename}/objects/persons/itm/{alias}.json
|
||||
|
||||
A person has a property profils with a list of profilename, common profiles are : anonymous (no identity) / pagan (an identity) / person (an identity with access right into a tribe) / druid (the administrator of a tribe) / major (administrator of a town/server)
|
||||
A person has a property profils with a list of profilename, common profiles are : anonymous (no identity) / pagan (an identity) / person (an identity with access right into a tribe) / druid (the administrator of a tribe) / mayor (administrator of a town/server)
|
||||
|
||||
Each object has an apxaccessrights that is a list of profil and CRUD access per object key .
|
||||
|
||||
@@ -124,8 +130,13 @@ Accessible with https://dns/api/tribename/routes
|
||||
|
||||
```plaintext
|
||||
// Example of a route
|
||||
const tribe="smatchit";
|
||||
const conftrib = require(`../../../itm/${tribe}.json`);
|
||||
const conf = require(`../../../../conf/townconf.json`);
|
||||
const express = require(`../../../adminapi/apxtri/node_modules/express`);
|
||||
const fs = require(`../../../adminapi/apxtri/node_modules/fs-extra`);
|
||||
const Nofications = require(`../../../adminapi/apxtri/models/Notifications.js`);
|
||||
const Appscreens = require(`../models/Appscreens`);
|
||||
const router=express.Router();
|
||||
module.exports=router;
|
||||
```
|
@@ -10,7 +10,7 @@ const conf = require(`../../../../conf/townconf.json`);
|
||||
const currentmod='isAuthenticated';
|
||||
const log = conf.api.activelog.includes(currentmod)
|
||||
/**
|
||||
* @api {get} http://header/istauthenticated - isAuthenticated
|
||||
* @api {get} / - isAuthenticated
|
||||
* @apiGroup Middlewares
|
||||
* @apiName isAuthenticated
|
||||
* @apiDescription - valid if exist xalias_xdays_xhash.substr(20,200) in town/tmp/tokens/
|
||||
|
Reference in New Issue
Block a user