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.
|
* A **request** is send with specific header to be accepted.
|
||||||
```
|
```
|
||||||
{
|
{
|
||||||
xauth: 'jwt token 24hours valid or 1 if not authenticated',
|
xjwt: 'jwt token 24hours valid or 1 if not authenticated',
|
||||||
xpaganid: 'uuid of the connected user'
|
xpseudo: 'uuid of the connected user'
|
||||||
xlang:' lang international notification 2 letters of the request',
|
xlang:' lang international notification 2 letters of the request',
|
||||||
xtribe: 'name of the tribe, xpaganId belongs to',
|
xtribe: 'name of the tribe, xpseudo have acces right',
|
||||||
xworkon: 'name of tribe user want to act if accessrights are properly set up',
|
xapp: 'name of app requesting action "" if accessrights are set up'
|
||||||
xapp: 'name of app requesting action "tribename:nappname" if accessrights are set up'
|
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
* A **response** is structured as
|
* 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,
|
info: optional string,
|
||||||
data: optional object
|
data: optional object
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Code list [https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml]
|
||||||
|
|
||||||
```
|
```
|
||||||
* **Multilanguage management** depending of header.xlang request
|
* **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
|
### apXtrib Coding Convention
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user