Project

General

Profile

Torque Vault Server » History » Version 4

Trần Lâm Trường, 08/26/2026 06:48 AM

1 1 Trần Lâm Trường
# Torque Vault Server
2 2 Trần Lâm Trường
---
3
4
## Plans
5 3 Trần Lâm Trường
- [x] Migrate the source code from Gitlab to Gitea.
6 2 Trần Lâm Trường
- [x] Switch to `develop` branch to continue development.
7
- [ ] Standardize responses from API:
8 4 Trần Lâm Trường
  + **Success response**:
9
    - *List resource (no pagination)*:
10
     `GET /api/v1/able-work-order?wo_id=1`
11
     => `200 OK`
12
    ```
13
    {
14
      "data": [
15
        WorkOrder_Object,
16
        WorkOrder_Object,
17
      ]
18
    }
19
    ```
20
    - *List resource (pagination)*:
21
    `GET /api/v1/work-orders?page=1&page_size=20`
22
    => `200 OK`
23
    ```
24
    {
25
      "data": [
26
        WorkOrder_Object,
27
        WorkOrder_Object,
28
      ],
29
      "meta": {
30
        "page": 1,
31
        "page_size": 20,
32
        "total_pages": 7
33
      }
34
    }
35
    ```
36
    - *Retrieve detail*:
37
    `GET /api/v1/work-orders/1`
38
    => `200 OK`
39
    ```
40
    {
41
     "data": WorkOrder_Object
42
    }
43
    ```
44
    - *Create resource*:
45
    `POST /api/v1/work-orders`
46
    => `201 Created`
47
    ```
48
    {
49
     "data": WorkOrder_Object
50
    }
51
    ```
52
    - *Update resource*:
53
    ` PUT/PATCH /api/v1/work-orders/1`
54
    => `200 OK`
55
    ```
56
    {
57
     "data": WorkOrder_Object
58
    }
59
    ```
60
    - *Delete resource*:
61
    ` DELETE /api/v1/work-orders/1`
62
    => `204 No Content`
63
    ```
64
    (Empty)
65
    ```
66
  + **Error response**:
67
    ```
68
    {
69
      "code": "string",
70
      "message": "string"
71
    }
72
    ```
73
      - *Validation Error*:
74
      `POST /api/v1/work-orders`
75
      => `400 Bad Request`
76
      ```
77
      {
78
        "code": "VALIDATION_ERROR",
79
        "message": "Validation failed",
80
        "errors": {
81
          "make": [
82
            "This field is required."
83
          ],
84
          "employee": [
85
            "This field is required."
86
          ]
87
        }
88
      }
89
      ```
90
      - *Resource Not Found*:
91
      `PATCH /api/v1/work-orders/1`
92
      => `404 Not Found`
93
      ```
94
      {
95
        "code": "404_NOT_FOUND",
96
        "message": "Work order not found"
97
      }
98
      ```
99 2 Trần Lâm Trường
- [ ] Develop an API endpoint for the mobile app home screen to retrieve all work orders whose status is Open, Retorque, Servicing, or Re-servicing.
100
- [ ] Migrate the `Help / Instructions` feature from `walmart` branch to `develop` branch.
101
- [ ] CI CD integration.