Skip to content

Commit 64621cb

Browse files
committed
fix: user service
1 parent 6e84435 commit 64621cb

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

src/controllers/User/service.ts

+13-5
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ const including = [{ model: Role }]
1212

1313
class UserService {
1414
/**
15-
* Get All User
15+
*
16+
* @param req Request
1617
*/
1718
public static async getAll(req: any) {
1819
const { filtered } = req.query
@@ -35,7 +36,8 @@ class UserService {
3536
}
3637

3738
/**
38-
* Get One User
39+
*
40+
* @param id
3941
*/
4042
public static async getOne(id: string) {
4143
const data = await User.findByPk(id, {
@@ -50,7 +52,9 @@ class UserService {
5052
}
5153

5254
/**
53-
* Create User
55+
*
56+
* @param formData
57+
* @param txn Transaction Sequelize
5458
*/
5559
public static async create(formData: UserAttributes, txn?: Transaction) {
5660
const { Roles }: any = formData
@@ -79,7 +83,10 @@ class UserService {
7983
}
8084

8185
/**
82-
* Update User By Id
86+
*
87+
* @param id
88+
* @param formData
89+
* @param txn Transaction Sequelize
8390
*/
8491
public static async update(
8592
id: string,
@@ -118,7 +125,8 @@ class UserService {
118125
}
119126

120127
/**
121-
* Delete User By Id
128+
*
129+
* @param id
122130
*/
123131
public static async delete(id: string) {
124132
const data = await this.getOne(id)

0 commit comments

Comments
 (0)