File tree 1 file changed +13
-5
lines changed
1 file changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,8 @@ const including = [{ model: Role }]
12
12
13
13
class UserService {
14
14
/**
15
- * Get All User
15
+ *
16
+ * @param req Request
16
17
*/
17
18
public static async getAll ( req : any ) {
18
19
const { filtered } = req . query
@@ -35,7 +36,8 @@ class UserService {
35
36
}
36
37
37
38
/**
38
- * Get One User
39
+ *
40
+ * @param id
39
41
*/
40
42
public static async getOne ( id : string ) {
41
43
const data = await User . findByPk ( id , {
@@ -50,7 +52,9 @@ class UserService {
50
52
}
51
53
52
54
/**
53
- * Create User
55
+ *
56
+ * @param formData
57
+ * @param txn Transaction Sequelize
54
58
*/
55
59
public static async create ( formData : UserAttributes , txn ?: Transaction ) {
56
60
const { Roles } : any = formData
@@ -79,7 +83,10 @@ class UserService {
79
83
}
80
84
81
85
/**
82
- * Update User By Id
86
+ *
87
+ * @param id
88
+ * @param formData
89
+ * @param txn Transaction Sequelize
83
90
*/
84
91
public static async update (
85
92
id : string ,
@@ -118,7 +125,8 @@ class UserService {
118
125
}
119
126
120
127
/**
121
- * Delete User By Id
128
+ *
129
+ * @param id
122
130
*/
123
131
public static async delete ( id : string ) {
124
132
const data = await this . getOne ( id )
You can’t perform that action at this time.
0 commit comments