Mise à jour de 'Devrules'
parent
6eab164004
commit
4c551d4bd9
29
Devrules.md
29
Devrules.md
@ -75,24 +75,39 @@ Initialize a developer branch, each developer must create and checkout a new bra
|
||||
* A **request** is send with specific header to be accepted.
|
||||
```
|
||||
{
|
||||
xauth: 'jwt token 24hours valid or 1 if not authenticated',
|
||||
xpaganid: 'uuid of the connected user'
|
||||
xjwt: 'jwt token 24hours valid or 1 if not authenticated',
|
||||
xpseudo: 'uuid of the connected user'
|
||||
xlang:' lang international notification 2 letters of the request',
|
||||
xtribe: 'name of the tribe, xpaganId belongs to',
|
||||
xworkon: 'name of tribe user want to act if accessrights are properly set up',
|
||||
xapp: 'name of app requesting action "tribename:nappname" if accessrights are set up'
|
||||
xtribe: 'name of the tribe, xpseudo have acces right',
|
||||
xapp: 'name of app requesting action "" if accessrights are set up'
|
||||
}
|
||||
```
|
||||
* A **response** is structured as
|
||||
```
|
||||
{
|
||||
status: mandatory Integer,(web status code)[https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml]
|
||||
status: mandatory Integer,(web status code)
|
||||
info: optional string,
|
||||
data: optional object
|
||||
}
|
||||
|
||||
Code list [https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml]
|
||||
|
||||
```
|
||||
* **Multilanguage management** depending of header.xlang request
|
||||
- info:"|model|key" starting by | mean a file is available in ./nationchains/static/info/model_lg.json to match {key:"information in language lg}
|
||||
```
|
||||
/folder/
|
||||
/lg/
|
||||
action_lg.json
|
||||
action.js
|
||||
|
||||
action_lg.json={"keyword":"a mustache string in lg language"}
|
||||
|
||||
a return action.js ret = {status, ref:action, info:keyword, data:object}
|
||||
|
||||
```
|
||||
in client site => you can manage return with mustache.render([ret.ref]_[xlang].json[ret.info],ret.data)
|
||||
|
||||
Any lg/action_lg.json is accessible from url:
|
||||
|
||||
### apXtrib Coding Convention
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user