or
or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up
Syntax | Example | Reference | |
---|---|---|---|
# Header | Header | 基本排版 | |
- Unordered List |
|
||
1. Ordered List |
|
||
- [ ] Todo List |
|
||
> Blockquote | Blockquote |
||
**Bold font** | Bold font | ||
*Italics font* | Italics font | ||
~~Strikethrough~~ | |||
19^th^ | 19th | ||
H~2~O | H2O | ||
++Inserted text++ | Inserted text | ||
==Marked text== | Marked text | ||
[link text](https:// "title") | Link | ||
 | Image | ||
`Code` | Code |
在筆記中貼入程式碼 | |
```javascript var i = 0; ``` |
|
||
:smile: | ![]() |
Emoji list | |
{%youtube youtube_id %} | Externals | ||
$L^aT_eX$ | LaTeX | ||
:::info This is a alert area. ::: |
This is a alert area. |
On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?
Please give us some advice and help us improve HackMD.
Do you want to remove this version name and description?
Syncing
xxxxxxxxxx
📋 Content:
Authenticate
Login
POST /authentication/login
Login sẽ trả về access_token:
Sign up
POST /authentication/signup
Get profile
GET /authentication/profile
Header : Brearer token
Request:
Response:
User
Get all profile
GET /users/getUsers
Header : Brearer token
Request:
Response:
Update list users
Put /users/updateList
Header : Brearer token
Request:
Response:
HttpStatus
Menu item
Đây là menu tổng, những chi nhánh chỉ được chọn ở đây chứ không tự tạo.
Tạm thời chưa gán quyền, cho tiện
Get list
GET /menu-items
Query:
sortBy
:id:DESC
…
Những query khác thêm rất nhanh nên nếu có nhu cầu thì ping phát.
Request:
GET /menu-items?sortBy=id:DESC
Response
Add menu item
Tạo một món mới trong menu tổng
POST /menu-items
Request
Response
Update menu item
PATCh /menu-items/:id
Update một phần, giống y như create trừ cái id ra.
vd:
PATCH /menu-items/bunbo
Feeds - Bài đăng
Lấy danh sách
GET /feeds
Cũng có query, paginate như trên list menu
Response
Add feed
POST /feeds
Request
Response
Update feed
PATCH /feeds/:id
Request
Patch /feeds/1
Response
Branch - chi nhánh
Create branch - tạo chi nhánh mới
Phương thức chỉ có Admin được gọi
POST /branchs
Request
Response
Update branch
Phương thức chỉ có Admin, quản lý branch và quản lý area
Patch /branchs/:branchId
Tương tự như khi tạo
Request
Response
Get branch list
Lấy danh sách branch thì ai cũng có thể gọi
GET /branchs
Lần này thì list thật, không có pagination như trên
Get a branch
GET /branchs/branch1
Get manage branch list
GET branchs/manage
Branch menu - quản lý menu cho chi nhánh
Get branch menu list
Lưu ý rằng branch menu list cấu trúc trả về và query sẽ khác một chút với menu.
Request
GET {{domain}}/branchs/branch1/menus?filter.menu_item.item_type=1&limit=3
Response
Add a branch menu
POST /branchs/:branchId/menus
Request
Response
Get a branch menu item
GET /branchs/:branchId/menus/:menuId
Request
{{domain}}/branchs/branch1/menus/bunbo
Response
Order
Create an order
Tạo một order sẽ dựa theo token role là gì, nếu token có role là Khách hàng thì chỉ được tạo đơn có loại online, ngược lại thì có thể tạo đơn mang đi và tại bàn
Header Brearer token
POST /branchs/:branchId/orders
Request
Response
Report
Doanh thu theo chi nhánh
/report/revenue/by-branch
Query:
year: nhập năm
branchId: nhập chi nhánh
Nếu nhập năm sẽ lọc theo tháng
Nếu nhập branchId sẽ lọc theo branchId, nếu không lấy tất cả
Doanh thu theo Khu vực
/report/revenue/by-area
Query:
year: nhập năm
areaId: nhập mã chi nhánh
Nếu nhập năm sẽ lọc theo tháng
Nếu nhập areaId sẽ lọc theo areaId, nếu không lấy tất cả
Area
Get all branch
GET /area
Response
Update area manager
POST {{domain}}/area/:id/manager
vd: POST {{domain}}/area/1/manager
body:
Return object of area
Get Detail area
GET area/:id