add createMethod #2

Merged
lqhoang99 merged 4 commits from feature/createMethod into master 2021-11-05 09:28:06 +00:00
3 changed files with 26 additions and 12 deletions
Showing only changes of commit 9905ab89ae - Show all commits

View File

@ -7,7 +7,6 @@ import (
namhq1989 commented 2021-11-05 07:27:44 +00:00 (Migrated from github.com)
Review

DeviceCreate -> CreateOptions

DeviceCreate -> CreateOptions
namhq1989 commented 2021-11-05 07:27:44 +00:00 (Migrated from github.com)
Review

DeviceCreate -> CreateOptions

DeviceCreate -> CreateOptions
namhq1989 commented 2021-11-05 07:31:39 +00:00 (Migrated from github.com)
Review

deviceID already exists -> this device is already existed

deviceID already exists -> this device is already existed
namhq1989 commented 2021-11-05 07:31:39 +00:00 (Migrated from github.com)
Review

deviceID already exists -> this device is already existed

deviceID already exists -> this device is already existed
namhq1989 commented 2021-11-05 07:33:20 +00:00 (Migrated from github.com)
Review
return fmt.Errorf("error when create device: %s", err.Error())
```go return fmt.Errorf("error when create device: %s", err.Error()) ```
namhq1989 commented 2021-11-05 07:33:20 +00:00 (Migrated from github.com)
Review
return fmt.Errorf("error when create device: %s", err.Error())
```go return fmt.Errorf("error when create device: %s", err.Error()) ```
namhq1989 commented 2021-11-05 07:35:14 +00:00 (Migrated from github.com)
Review

move ra 1 func khác để validate

move ra 1 func khác để validate
namhq1989 commented 2021-11-05 07:35:14 +00:00 (Migrated from github.com)
Review

move ra 1 func khác để validate

move ra 1 func khác để validate
namhq1989 commented 2021-11-05 07:35:31 +00:00 (Migrated from github.com)
Review

move ra 1 func khác để validate

move ra 1 func khác để validate
namhq1989 commented 2021-11-05 07:35:31 +00:00 (Migrated from github.com)
Review

move ra 1 func khác để validate

move ra 1 func khác để validate
namhq1989 commented 2021-11-05 07:35:53 +00:00 (Migrated from github.com)
Review

move ra 1 func khác để validate

move ra 1 func khác để validate
namhq1989 commented 2021-11-05 07:35:53 +00:00 (Migrated from github.com)
Review

move ra 1 func khác để validate

move ra 1 func khác để validate
namhq1989 commented 2021-11-05 07:36:56 +00:00 (Migrated from github.com)
Review

move ra 1 func khác để set, set cứng device.Language = langVi

move ra 1 func khác để set, set cứng `device.Language = langVi`
namhq1989 commented 2021-11-05 07:36:56 +00:00 (Migrated from github.com)
Review

move ra 1 func khác để set, set cứng device.Language = langVi

move ra 1 func khác để set, set cứng `device.Language = langVi`
namhq1989 commented 2021-11-05 07:37:25 +00:00 (Migrated from github.com)
Review

ko cần check userID là mongo id, ko empty là được

ko cần check userID là mongo id, ko empty là được
namhq1989 commented 2021-11-05 07:37:25 +00:00 (Migrated from github.com)
Review

ko cần check userID là mongo id, ko empty là được

ko cần check userID là mongo id, ko empty là được
namhq1989 commented 2021-11-05 07:37:32 +00:00 (Migrated from github.com)
Review

bỏ cái này

bỏ cái này
namhq1989 commented 2021-11-05 07:37:32 +00:00 (Migrated from github.com)
Review

bỏ cái này

bỏ cái này
lqhoang99 commented 2021-11-05 08:32:48 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:32:48 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:33:15 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:33:15 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:33:21 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:33:21 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:33:28 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:33:28 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:33:54 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:33:54 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:34:00 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:34:00 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:34:13 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:34:13 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:34:23 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:34:23 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:34:30 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:34:30 +00:00 (Migrated from github.com)
Review

done

done
namhq1989 commented 2021-11-05 08:58:38 +00:00 (Migrated from github.com)
Review

đoạn này + đoạn device id iszero, viết thành 1 func khác isDeviceIDExisted trả về boolean

đoạn này + đoạn device id iszero, viết thành 1 func khác `isDeviceIDExisted` trả về boolean
namhq1989 commented 2021-11-05 08:58:38 +00:00 (Migrated from github.com)
Review

đoạn này + đoạn device id iszero, viết thành 1 func khác isDeviceIDExisted trả về boolean

đoạn này + đoạn device id iszero, viết thành 1 func khác `isDeviceIDExisted` trả về boolean
lqhoang99 commented 2021-11-05 09:12:15 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 09:12:15 +00:00 (Migrated from github.com)
Review

done

done
"github.com/Selly-Modules/logger" "github.com/Selly-Modules/logger"
"github.com/Selly-Modules/mongodb" "github.com/Selly-Modules/mongodb"
"go.mongodb.org/mongo-driver/bson"
namhq1989 commented 2021-11-05 07:27:44 +00:00 (Migrated from github.com)
Review

DeviceCreate -> CreateOptions

DeviceCreate -> CreateOptions
namhq1989 commented 2021-11-05 07:31:39 +00:00 (Migrated from github.com)
Review

deviceID already exists -> this device is already existed

deviceID already exists -> this device is already existed
namhq1989 commented 2021-11-05 07:33:20 +00:00 (Migrated from github.com)
Review
return fmt.Errorf("error when create device: %s", err.Error())
```go return fmt.Errorf("error when create device: %s", err.Error()) ```
namhq1989 commented 2021-11-05 07:35:14 +00:00 (Migrated from github.com)
Review

move ra 1 func khác để validate

move ra 1 func khác để validate
namhq1989 commented 2021-11-05 07:35:31 +00:00 (Migrated from github.com)
Review

move ra 1 func khác để validate

move ra 1 func khác để validate
namhq1989 commented 2021-11-05 07:35:53 +00:00 (Migrated from github.com)
Review

move ra 1 func khác để validate

move ra 1 func khác để validate
namhq1989 commented 2021-11-05 07:36:56 +00:00 (Migrated from github.com)
Review

move ra 1 func khác để set, set cứng device.Language = langVi

move ra 1 func khác để set, set cứng `device.Language = langVi`
namhq1989 commented 2021-11-05 07:37:25 +00:00 (Migrated from github.com)
Review

ko cần check userID là mongo id, ko empty là được

ko cần check userID là mongo id, ko empty là được
namhq1989 commented 2021-11-05 07:37:32 +00:00 (Migrated from github.com)
Review

bỏ cái này

bỏ cái này
lqhoang99 commented 2021-11-05 08:32:48 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:33:15 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:33:21 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:33:28 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:33:54 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:34:00 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:34:13 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:34:23 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:34:30 +00:00 (Migrated from github.com)
Review

done

done
namhq1989 commented 2021-11-05 08:58:38 +00:00 (Migrated from github.com)
Review

đoạn này + đoạn device id iszero, viết thành 1 func khác isDeviceIDExisted trả về boolean

đoạn này + đoạn device id iszero, viết thành 1 func khác `isDeviceIDExisted` trả về boolean
lqhoang99 commented 2021-11-05 09:12:15 +00:00 (Migrated from github.com)
Review

done

done
) )
// CreateOptions ... // CreateOptions ...
@ -41,15 +40,8 @@ func (s Service) Create(payload CreateOptions) error {
namhq1989 commented 2021-11-05 07:27:44 +00:00 (Migrated from github.com)
Review

DeviceCreate -> CreateOptions

DeviceCreate -> CreateOptions
namhq1989 commented 2021-11-05 07:27:44 +00:00 (Migrated from github.com)
Review

DeviceCreate -> CreateOptions

DeviceCreate -> CreateOptions
namhq1989 commented 2021-11-05 07:31:39 +00:00 (Migrated from github.com)
Review

deviceID already exists -> this device is already existed

deviceID already exists -> this device is already existed
namhq1989 commented 2021-11-05 07:31:39 +00:00 (Migrated from github.com)
Review

deviceID already exists -> this device is already existed

deviceID already exists -> this device is already existed
namhq1989 commented 2021-11-05 07:33:20 +00:00 (Migrated from github.com)
Review
return fmt.Errorf("error when create device: %s", err.Error())
```go return fmt.Errorf("error when create device: %s", err.Error()) ```
namhq1989 commented 2021-11-05 07:33:20 +00:00 (Migrated from github.com)
Review
return fmt.Errorf("error when create device: %s", err.Error())
```go return fmt.Errorf("error when create device: %s", err.Error()) ```
namhq1989 commented 2021-11-05 07:35:14 +00:00 (Migrated from github.com)
Review

move ra 1 func khác để validate

move ra 1 func khác để validate
namhq1989 commented 2021-11-05 07:35:14 +00:00 (Migrated from github.com)
Review

move ra 1 func khác để validate

move ra 1 func khác để validate
namhq1989 commented 2021-11-05 07:35:31 +00:00 (Migrated from github.com)
Review

move ra 1 func khác để validate

move ra 1 func khác để validate
namhq1989 commented 2021-11-05 07:35:31 +00:00 (Migrated from github.com)
Review

move ra 1 func khác để validate

move ra 1 func khác để validate
namhq1989 commented 2021-11-05 07:35:53 +00:00 (Migrated from github.com)
Review

move ra 1 func khác để validate

move ra 1 func khác để validate
namhq1989 commented 2021-11-05 07:35:53 +00:00 (Migrated from github.com)
Review

move ra 1 func khác để validate

move ra 1 func khác để validate
namhq1989 commented 2021-11-05 07:36:56 +00:00 (Migrated from github.com)
Review

move ra 1 func khác để set, set cứng device.Language = langVi

move ra 1 func khác để set, set cứng `device.Language = langVi`
namhq1989 commented 2021-11-05 07:36:56 +00:00 (Migrated from github.com)
Review

move ra 1 func khác để set, set cứng device.Language = langVi

move ra 1 func khác để set, set cứng `device.Language = langVi`
namhq1989 commented 2021-11-05 07:37:25 +00:00 (Migrated from github.com)
Review

ko cần check userID là mongo id, ko empty là được

ko cần check userID là mongo id, ko empty là được
namhq1989 commented 2021-11-05 07:37:25 +00:00 (Migrated from github.com)
Review

ko cần check userID là mongo id, ko empty là được

ko cần check userID là mongo id, ko empty là được
namhq1989 commented 2021-11-05 07:37:32 +00:00 (Migrated from github.com)
Review

bỏ cái này

bỏ cái này
namhq1989 commented 2021-11-05 07:37:32 +00:00 (Migrated from github.com)
Review

bỏ cái này

bỏ cái này
lqhoang99 commented 2021-11-05 08:32:48 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:32:48 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:33:15 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:33:15 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:33:21 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:33:21 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:33:28 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:33:28 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:33:54 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:33:54 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:34:00 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:34:00 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:34:13 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:34:13 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:34:23 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:34:23 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:34:30 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:34:30 +00:00 (Migrated from github.com)
Review

done

done
namhq1989 commented 2021-11-05 08:58:38 +00:00 (Migrated from github.com)
Review

đoạn này + đoạn device id iszero, viết thành 1 func khác isDeviceIDExisted trả về boolean

đoạn này + đoạn device id iszero, viết thành 1 func khác `isDeviceIDExisted` trả về boolean
namhq1989 commented 2021-11-05 08:58:38 +00:00 (Migrated from github.com)
Review

đoạn này + đoạn device id iszero, viết thành 1 func khác isDeviceIDExisted trả về boolean

đoạn này + đoạn device id iszero, viết thành 1 func khác `isDeviceIDExisted` trả về boolean
lqhoang99 commented 2021-11-05 09:12:15 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 09:12:15 +00:00 (Migrated from github.com)
Review

done

done
return err return err
} }
// Find device id existed or not // Find deviceID existed or not
namhq1989 commented 2021-11-05 07:27:44 +00:00 (Migrated from github.com)
Review

DeviceCreate -> CreateOptions

DeviceCreate -> CreateOptions
namhq1989 commented 2021-11-05 07:31:39 +00:00 (Migrated from github.com)
Review

deviceID already exists -> this device is already existed

deviceID already exists -> this device is already existed
namhq1989 commented 2021-11-05 07:33:20 +00:00 (Migrated from github.com)
Review
return fmt.Errorf("error when create device: %s", err.Error())
```go return fmt.Errorf("error when create device: %s", err.Error()) ```
namhq1989 commented 2021-11-05 07:35:14 +00:00 (Migrated from github.com)
Review

move ra 1 func khác để validate

move ra 1 func khác để validate
namhq1989 commented 2021-11-05 07:35:31 +00:00 (Migrated from github.com)
Review

move ra 1 func khác để validate

move ra 1 func khác để validate
namhq1989 commented 2021-11-05 07:35:53 +00:00 (Migrated from github.com)
Review

move ra 1 func khác để validate

move ra 1 func khác để validate
namhq1989 commented 2021-11-05 07:36:56 +00:00 (Migrated from github.com)
Review

move ra 1 func khác để set, set cứng device.Language = langVi

move ra 1 func khác để set, set cứng `device.Language = langVi`
namhq1989 commented 2021-11-05 07:37:25 +00:00 (Migrated from github.com)
Review

ko cần check userID là mongo id, ko empty là được

ko cần check userID là mongo id, ko empty là được
namhq1989 commented 2021-11-05 07:37:32 +00:00 (Migrated from github.com)
Review

bỏ cái này

bỏ cái này
lqhoang99 commented 2021-11-05 08:32:48 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:33:15 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:33:21 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:33:28 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:33:54 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:34:00 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:34:13 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:34:23 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:34:30 +00:00 (Migrated from github.com)
Review

done

done
namhq1989 commented 2021-11-05 08:58:38 +00:00 (Migrated from github.com)
Review

đoạn này + đoạn device id iszero, viết thành 1 func khác isDeviceIDExisted trả về boolean

đoạn này + đoạn device id iszero, viết thành 1 func khác `isDeviceIDExisted` trả về boolean
lqhoang99 commented 2021-11-05 09:12:15 +00:00 (Migrated from github.com)
Review

done

done
namhq1989 commented 2021-11-05 07:27:44 +00:00 (Migrated from github.com)
Review

DeviceCreate -> CreateOptions

DeviceCreate -> CreateOptions
namhq1989 commented 2021-11-05 07:31:39 +00:00 (Migrated from github.com)
Review

deviceID already exists -> this device is already existed

deviceID already exists -> this device is already existed
namhq1989 commented 2021-11-05 07:33:20 +00:00 (Migrated from github.com)
Review
return fmt.Errorf("error when create device: %s", err.Error())
```go return fmt.Errorf("error when create device: %s", err.Error()) ```
namhq1989 commented 2021-11-05 07:35:14 +00:00 (Migrated from github.com)
Review

move ra 1 func khác để validate

move ra 1 func khác để validate
namhq1989 commented 2021-11-05 07:35:31 +00:00 (Migrated from github.com)
Review

move ra 1 func khác để validate

move ra 1 func khác để validate
namhq1989 commented 2021-11-05 07:35:53 +00:00 (Migrated from github.com)
Review

move ra 1 func khác để validate

move ra 1 func khác để validate
namhq1989 commented 2021-11-05 07:36:56 +00:00 (Migrated from github.com)
Review

move ra 1 func khác để set, set cứng device.Language = langVi

move ra 1 func khác để set, set cứng `device.Language = langVi`
namhq1989 commented 2021-11-05 07:37:25 +00:00 (Migrated from github.com)
Review

ko cần check userID là mongo id, ko empty là được

ko cần check userID là mongo id, ko empty là được
namhq1989 commented 2021-11-05 07:37:32 +00:00 (Migrated from github.com)
Review

bỏ cái này

bỏ cái này
lqhoang99 commented 2021-11-05 08:32:48 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:33:15 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:33:21 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:33:28 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:33:54 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:34:00 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:34:13 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:34:23 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:34:30 +00:00 (Migrated from github.com)
Review

done

done
namhq1989 commented 2021-11-05 08:58:38 +00:00 (Migrated from github.com)
Review

đoạn này + đoạn device id iszero, viết thành 1 func khác isDeviceIDExisted trả về boolean

đoạn này + đoạn device id iszero, viết thành 1 func khác `isDeviceIDExisted` trả về boolean
lqhoang99 commented 2021-11-05 09:12:15 +00:00 (Migrated from github.com)
Review

done

done
device := Device{} if s.isDeviceIDExisted(ctx, deviceData.DeviceID) {
namhq1989 commented 2021-11-05 07:27:44 +00:00 (Migrated from github.com)
Review

DeviceCreate -> CreateOptions

DeviceCreate -> CreateOptions
namhq1989 commented 2021-11-05 07:31:39 +00:00 (Migrated from github.com)
Review

deviceID already exists -> this device is already existed

deviceID already exists -> this device is already existed
namhq1989 commented 2021-11-05 07:33:20 +00:00 (Migrated from github.com)
Review
return fmt.Errorf("error when create device: %s", err.Error())
```go return fmt.Errorf("error when create device: %s", err.Error()) ```
namhq1989 commented 2021-11-05 07:35:14 +00:00 (Migrated from github.com)
Review

move ra 1 func khác để validate

move ra 1 func khác để validate
namhq1989 commented 2021-11-05 07:35:31 +00:00 (Migrated from github.com)
Review

move ra 1 func khác để validate

move ra 1 func khác để validate
namhq1989 commented 2021-11-05 07:35:53 +00:00 (Migrated from github.com)
Review

move ra 1 func khác để validate

move ra 1 func khác để validate
namhq1989 commented 2021-11-05 07:36:56 +00:00 (Migrated from github.com)
Review

move ra 1 func khác để set, set cứng device.Language = langVi

move ra 1 func khác để set, set cứng `device.Language = langVi`
namhq1989 commented 2021-11-05 07:37:25 +00:00 (Migrated from github.com)
Review

ko cần check userID là mongo id, ko empty là được

ko cần check userID là mongo id, ko empty là được
namhq1989 commented 2021-11-05 07:37:32 +00:00 (Migrated from github.com)
Review

bỏ cái này

bỏ cái này
lqhoang99 commented 2021-11-05 08:32:48 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:33:15 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:33:21 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:33:28 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:33:54 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:34:00 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:34:13 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:34:23 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:34:30 +00:00 (Migrated from github.com)
Review

done

done
namhq1989 commented 2021-11-05 08:58:38 +00:00 (Migrated from github.com)
Review

đoạn này + đoạn device id iszero, viết thành 1 func khác isDeviceIDExisted trả về boolean

đoạn này + đoạn device id iszero, viết thành 1 func khác `isDeviceIDExisted` trả về boolean
lqhoang99 commented 2021-11-05 09:12:15 +00:00 (Migrated from github.com)
Review

done

done
namhq1989 commented 2021-11-05 07:27:44 +00:00 (Migrated from github.com)
Review

DeviceCreate -> CreateOptions

DeviceCreate -> CreateOptions
namhq1989 commented 2021-11-05 07:31:39 +00:00 (Migrated from github.com)
Review

deviceID already exists -> this device is already existed

deviceID already exists -> this device is already existed
namhq1989 commented 2021-11-05 07:33:20 +00:00 (Migrated from github.com)
Review
return fmt.Errorf("error when create device: %s", err.Error())
```go return fmt.Errorf("error when create device: %s", err.Error()) ```
namhq1989 commented 2021-11-05 07:35:14 +00:00 (Migrated from github.com)
Review

move ra 1 func khác để validate

move ra 1 func khác để validate
namhq1989 commented 2021-11-05 07:35:31 +00:00 (Migrated from github.com)
Review

move ra 1 func khác để validate

move ra 1 func khác để validate
namhq1989 commented 2021-11-05 07:35:53 +00:00 (Migrated from github.com)
Review

move ra 1 func khác để validate

move ra 1 func khác để validate
namhq1989 commented 2021-11-05 07:36:56 +00:00 (Migrated from github.com)
Review

move ra 1 func khác để set, set cứng device.Language = langVi

move ra 1 func khác để set, set cứng `device.Language = langVi`
namhq1989 commented 2021-11-05 07:37:25 +00:00 (Migrated from github.com)
Review

ko cần check userID là mongo id, ko empty là được

ko cần check userID là mongo id, ko empty là được
namhq1989 commented 2021-11-05 07:37:32 +00:00 (Migrated from github.com)
Review

bỏ cái này

bỏ cái này
lqhoang99 commented 2021-11-05 08:32:48 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:33:15 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:33:21 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:33:28 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:33:54 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:34:00 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:34:13 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:34:23 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:34:30 +00:00 (Migrated from github.com)
Review

done

done
namhq1989 commented 2021-11-05 08:58:38 +00:00 (Migrated from github.com)
Review

đoạn này + đoạn device id iszero, viết thành 1 func khác isDeviceIDExisted trả về boolean

đoạn này + đoạn device id iszero, viết thành 1 func khác `isDeviceIDExisted` trả về boolean
lqhoang99 commented 2021-11-05 09:12:15 +00:00 (Migrated from github.com)
Review

done

done
if err = col.FindOne(ctx, bson.M{"deviceID": deviceData.DeviceID}).Decode(&device); err != nil {
namhq1989 commented 2021-11-05 07:27:44 +00:00 (Migrated from github.com)
Review

DeviceCreate -> CreateOptions

DeviceCreate -> CreateOptions
namhq1989 commented 2021-11-05 07:31:39 +00:00 (Migrated from github.com)
Review

deviceID already exists -> this device is already existed

deviceID already exists -> this device is already existed
namhq1989 commented 2021-11-05 07:33:20 +00:00 (Migrated from github.com)
Review
return fmt.Errorf("error when create device: %s", err.Error())
```go return fmt.Errorf("error when create device: %s", err.Error()) ```
namhq1989 commented 2021-11-05 07:35:14 +00:00 (Migrated from github.com)
Review

move ra 1 func khác để validate

move ra 1 func khác để validate
namhq1989 commented 2021-11-05 07:35:31 +00:00 (Migrated from github.com)
Review

move ra 1 func khác để validate

move ra 1 func khác để validate
namhq1989 commented 2021-11-05 07:35:53 +00:00 (Migrated from github.com)
Review

move ra 1 func khác để validate

move ra 1 func khác để validate
namhq1989 commented 2021-11-05 07:36:56 +00:00 (Migrated from github.com)
Review

move ra 1 func khác để set, set cứng device.Language = langVi

move ra 1 func khác để set, set cứng `device.Language = langVi`
namhq1989 commented 2021-11-05 07:37:25 +00:00 (Migrated from github.com)
Review

ko cần check userID là mongo id, ko empty là được

ko cần check userID là mongo id, ko empty là được
namhq1989 commented 2021-11-05 07:37:32 +00:00 (Migrated from github.com)
Review

bỏ cái này

bỏ cái này
lqhoang99 commented 2021-11-05 08:32:48 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:33:15 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:33:21 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:33:28 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:33:54 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:34:00 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:34:13 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:34:23 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:34:30 +00:00 (Migrated from github.com)
Review

done

done
namhq1989 commented 2021-11-05 08:58:38 +00:00 (Migrated from github.com)
Review

đoạn này + đoạn device id iszero, viết thành 1 func khác isDeviceIDExisted trả về boolean

đoạn này + đoạn device id iszero, viết thành 1 func khác `isDeviceIDExisted` trả về boolean
lqhoang99 commented 2021-11-05 09:12:15 +00:00 (Migrated from github.com)
Review

done

done
logger.Error("devicemngt - findByDeviceID", logger.LogData{
namhq1989 commented 2021-11-05 07:27:44 +00:00 (Migrated from github.com)
Review

DeviceCreate -> CreateOptions

DeviceCreate -> CreateOptions
namhq1989 commented 2021-11-05 07:31:39 +00:00 (Migrated from github.com)
Review

deviceID already exists -> this device is already existed

deviceID already exists -> this device is already existed
namhq1989 commented 2021-11-05 07:33:20 +00:00 (Migrated from github.com)
Review
return fmt.Errorf("error when create device: %s", err.Error())
```go return fmt.Errorf("error when create device: %s", err.Error()) ```
namhq1989 commented 2021-11-05 07:35:14 +00:00 (Migrated from github.com)
Review

move ra 1 func khác để validate

move ra 1 func khác để validate
namhq1989 commented 2021-11-05 07:35:31 +00:00 (Migrated from github.com)
Review

move ra 1 func khác để validate

move ra 1 func khác để validate
namhq1989 commented 2021-11-05 07:35:53 +00:00 (Migrated from github.com)
Review

move ra 1 func khác để validate

move ra 1 func khác để validate
namhq1989 commented 2021-11-05 07:36:56 +00:00 (Migrated from github.com)
Review

move ra 1 func khác để set, set cứng device.Language = langVi

move ra 1 func khác để set, set cứng `device.Language = langVi`
namhq1989 commented 2021-11-05 07:37:25 +00:00 (Migrated from github.com)
Review

ko cần check userID là mongo id, ko empty là được

ko cần check userID là mongo id, ko empty là được
namhq1989 commented 2021-11-05 07:37:32 +00:00 (Migrated from github.com)
Review

bỏ cái này

bỏ cái này
lqhoang99 commented 2021-11-05 08:32:48 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:33:15 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:33:21 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:33:28 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:33:54 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:34:00 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:34:13 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:34:23 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:34:30 +00:00 (Migrated from github.com)
Review

done

done
namhq1989 commented 2021-11-05 08:58:38 +00:00 (Migrated from github.com)
Review

đoạn này + đoạn device id iszero, viết thành 1 func khác isDeviceIDExisted trả về boolean

đoạn này + đoạn device id iszero, viết thành 1 func khác `isDeviceIDExisted` trả về boolean
lqhoang99 commented 2021-11-05 09:12:15 +00:00 (Migrated from github.com)
Review

done

done
"deviceID": deviceData.DeviceID,
namhq1989 commented 2021-11-05 07:27:44 +00:00 (Migrated from github.com)
Review

DeviceCreate -> CreateOptions

DeviceCreate -> CreateOptions
namhq1989 commented 2021-11-05 07:31:39 +00:00 (Migrated from github.com)
Review

deviceID already exists -> this device is already existed

deviceID already exists -> this device is already existed
namhq1989 commented 2021-11-05 07:33:20 +00:00 (Migrated from github.com)
Review
return fmt.Errorf("error when create device: %s", err.Error())
```go return fmt.Errorf("error when create device: %s", err.Error()) ```
namhq1989 commented 2021-11-05 07:35:14 +00:00 (Migrated from github.com)
Review

move ra 1 func khác để validate

move ra 1 func khác để validate
namhq1989 commented 2021-11-05 07:35:31 +00:00 (Migrated from github.com)
Review

move ra 1 func khác để validate

move ra 1 func khác để validate
namhq1989 commented 2021-11-05 07:35:53 +00:00 (Migrated from github.com)
Review

move ra 1 func khác để validate

move ra 1 func khác để validate
namhq1989 commented 2021-11-05 07:36:56 +00:00 (Migrated from github.com)
Review

move ra 1 func khác để set, set cứng device.Language = langVi

move ra 1 func khác để set, set cứng `device.Language = langVi`
namhq1989 commented 2021-11-05 07:37:25 +00:00 (Migrated from github.com)
Review

ko cần check userID là mongo id, ko empty là được

ko cần check userID là mongo id, ko empty là được
namhq1989 commented 2021-11-05 07:37:32 +00:00 (Migrated from github.com)
Review

bỏ cái này

bỏ cái này
lqhoang99 commented 2021-11-05 08:32:48 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:33:15 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:33:21 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:33:28 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:33:54 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:34:00 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:34:13 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:34:23 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:34:30 +00:00 (Migrated from github.com)
Review

done

done
namhq1989 commented 2021-11-05 08:58:38 +00:00 (Migrated from github.com)
Review

đoạn này + đoạn device id iszero, viết thành 1 func khác isDeviceIDExisted trả về boolean

đoạn này + đoạn device id iszero, viết thành 1 func khác `isDeviceIDExisted` trả về boolean
lqhoang99 commented 2021-11-05 09:12:15 +00:00 (Migrated from github.com)
Review

done

done
"err": err.Error(),
namhq1989 commented 2021-11-05 07:27:44 +00:00 (Migrated from github.com)
Review

DeviceCreate -> CreateOptions

DeviceCreate -> CreateOptions
namhq1989 commented 2021-11-05 07:31:39 +00:00 (Migrated from github.com)
Review

deviceID already exists -> this device is already existed

deviceID already exists -> this device is already existed
namhq1989 commented 2021-11-05 07:33:20 +00:00 (Migrated from github.com)
Review
return fmt.Errorf("error when create device: %s", err.Error())
```go return fmt.Errorf("error when create device: %s", err.Error()) ```
namhq1989 commented 2021-11-05 07:35:14 +00:00 (Migrated from github.com)
Review

move ra 1 func khác để validate

move ra 1 func khác để validate
namhq1989 commented 2021-11-05 07:35:31 +00:00 (Migrated from github.com)
Review

move ra 1 func khác để validate

move ra 1 func khác để validate
namhq1989 commented 2021-11-05 07:35:53 +00:00 (Migrated from github.com)
Review

move ra 1 func khác để validate

move ra 1 func khác để validate
namhq1989 commented 2021-11-05 07:36:56 +00:00 (Migrated from github.com)
Review

move ra 1 func khác để set, set cứng device.Language = langVi

move ra 1 func khác để set, set cứng `device.Language = langVi`
namhq1989 commented 2021-11-05 07:37:25 +00:00 (Migrated from github.com)
Review

ko cần check userID là mongo id, ko empty là được

ko cần check userID là mongo id, ko empty là được
namhq1989 commented 2021-11-05 07:37:32 +00:00 (Migrated from github.com)
Review

bỏ cái này

bỏ cái này
lqhoang99 commented 2021-11-05 08:32:48 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:33:15 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:33:21 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:33:28 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:33:54 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:34:00 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:34:13 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:34:23 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:34:30 +00:00 (Migrated from github.com)
Review

done

done
namhq1989 commented 2021-11-05 08:58:38 +00:00 (Migrated from github.com)
Review

đoạn này + đoạn device id iszero, viết thành 1 func khác isDeviceIDExisted trả về boolean

đoạn này + đoạn device id iszero, viết thành 1 func khác `isDeviceIDExisted` trả về boolean
lqhoang99 commented 2021-11-05 09:12:15 +00:00 (Migrated from github.com)
Review

done

done
})
namhq1989 commented 2021-11-05 07:27:44 +00:00 (Migrated from github.com)
Review

DeviceCreate -> CreateOptions

DeviceCreate -> CreateOptions
namhq1989 commented 2021-11-05 07:31:39 +00:00 (Migrated from github.com)
Review

deviceID already exists -> this device is already existed

deviceID already exists -> this device is already existed
namhq1989 commented 2021-11-05 07:33:20 +00:00 (Migrated from github.com)
Review
return fmt.Errorf("error when create device: %s", err.Error())
```go return fmt.Errorf("error when create device: %s", err.Error()) ```
namhq1989 commented 2021-11-05 07:35:14 +00:00 (Migrated from github.com)
Review

move ra 1 func khác để validate

move ra 1 func khác để validate
namhq1989 commented 2021-11-05 07:35:31 +00:00 (Migrated from github.com)
Review

move ra 1 func khác để validate

move ra 1 func khác để validate
namhq1989 commented 2021-11-05 07:35:53 +00:00 (Migrated from github.com)
Review

move ra 1 func khác để validate

move ra 1 func khác để validate
namhq1989 commented 2021-11-05 07:36:56 +00:00 (Migrated from github.com)
Review

move ra 1 func khác để set, set cứng device.Language = langVi

move ra 1 func khác để set, set cứng `device.Language = langVi`
namhq1989 commented 2021-11-05 07:37:25 +00:00 (Migrated from github.com)
Review

ko cần check userID là mongo id, ko empty là được

ko cần check userID là mongo id, ko empty là được
namhq1989 commented 2021-11-05 07:37:32 +00:00 (Migrated from github.com)
Review

bỏ cái này

bỏ cái này
lqhoang99 commented 2021-11-05 08:32:48 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:33:15 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:33:21 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:33:28 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:33:54 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:34:00 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:34:13 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:34:23 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:34:30 +00:00 (Migrated from github.com)
Review

done

done
namhq1989 commented 2021-11-05 08:58:38 +00:00 (Migrated from github.com)
Review

đoạn này + đoạn device id iszero, viết thành 1 func khác isDeviceIDExisted trả về boolean

đoạn này + đoạn device id iszero, viết thành 1 func khác `isDeviceIDExisted` trả về boolean
lqhoang99 commented 2021-11-05 09:12:15 +00:00 (Migrated from github.com)
Review

done

done
}
namhq1989 commented 2021-11-05 07:27:44 +00:00 (Migrated from github.com)
Review

DeviceCreate -> CreateOptions

DeviceCreate -> CreateOptions
namhq1989 commented 2021-11-05 07:31:39 +00:00 (Migrated from github.com)
Review

deviceID already exists -> this device is already existed

deviceID already exists -> this device is already existed
namhq1989 commented 2021-11-05 07:33:20 +00:00 (Migrated from github.com)
Review
return fmt.Errorf("error when create device: %s", err.Error())
```go return fmt.Errorf("error when create device: %s", err.Error()) ```
namhq1989 commented 2021-11-05 07:35:14 +00:00 (Migrated from github.com)
Review

move ra 1 func khác để validate

move ra 1 func khác để validate
namhq1989 commented 2021-11-05 07:35:31 +00:00 (Migrated from github.com)
Review

move ra 1 func khác để validate

move ra 1 func khác để validate
namhq1989 commented 2021-11-05 07:35:53 +00:00 (Migrated from github.com)
Review

move ra 1 func khác để validate

move ra 1 func khác để validate
namhq1989 commented 2021-11-05 07:36:56 +00:00 (Migrated from github.com)
Review

move ra 1 func khác để set, set cứng device.Language = langVi

move ra 1 func khác để set, set cứng `device.Language = langVi`
namhq1989 commented 2021-11-05 07:37:25 +00:00 (Migrated from github.com)
Review

ko cần check userID là mongo id, ko empty là được

ko cần check userID là mongo id, ko empty là được
namhq1989 commented 2021-11-05 07:37:32 +00:00 (Migrated from github.com)
Review

bỏ cái này

bỏ cái này
lqhoang99 commented 2021-11-05 08:32:48 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:33:15 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:33:21 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:33:28 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:33:54 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:34:00 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:34:13 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:34:23 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:34:30 +00:00 (Migrated from github.com)
Review

done

done
namhq1989 commented 2021-11-05 08:58:38 +00:00 (Migrated from github.com)
Review

đoạn này + đoạn device id iszero, viết thành 1 func khác isDeviceIDExisted trả về boolean

đoạn này + đoạn device id iszero, viết thành 1 func khác `isDeviceIDExisted` trả về boolean
lqhoang99 commented 2021-11-05 09:12:15 +00:00 (Migrated from github.com)
Review

done

done
if !device.ID.IsZero() {
namhq1989 commented 2021-11-05 07:27:44 +00:00 (Migrated from github.com)
Review

DeviceCreate -> CreateOptions

DeviceCreate -> CreateOptions
namhq1989 commented 2021-11-05 07:31:39 +00:00 (Migrated from github.com)
Review

deviceID already exists -> this device is already existed

deviceID already exists -> this device is already existed
namhq1989 commented 2021-11-05 07:33:20 +00:00 (Migrated from github.com)
Review
return fmt.Errorf("error when create device: %s", err.Error())
```go return fmt.Errorf("error when create device: %s", err.Error()) ```
namhq1989 commented 2021-11-05 07:35:14 +00:00 (Migrated from github.com)
Review

move ra 1 func khác để validate

move ra 1 func khác để validate
namhq1989 commented 2021-11-05 07:35:31 +00:00 (Migrated from github.com)
Review

move ra 1 func khác để validate

move ra 1 func khác để validate
namhq1989 commented 2021-11-05 07:35:53 +00:00 (Migrated from github.com)
Review

move ra 1 func khác để validate

move ra 1 func khác để validate
namhq1989 commented 2021-11-05 07:36:56 +00:00 (Migrated from github.com)
Review

move ra 1 func khác để set, set cứng device.Language = langVi

move ra 1 func khác để set, set cứng `device.Language = langVi`
namhq1989 commented 2021-11-05 07:37:25 +00:00 (Migrated from github.com)
Review

ko cần check userID là mongo id, ko empty là được

ko cần check userID là mongo id, ko empty là được
namhq1989 commented 2021-11-05 07:37:32 +00:00 (Migrated from github.com)
Review

bỏ cái này

bỏ cái này
lqhoang99 commented 2021-11-05 08:32:48 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:33:15 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:33:21 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:33:28 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:33:54 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:34:00 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:34:13 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:34:23 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:34:30 +00:00 (Migrated from github.com)
Review

done

done
namhq1989 commented 2021-11-05 08:58:38 +00:00 (Migrated from github.com)
Review

đoạn này + đoạn device id iszero, viết thành 1 func khác isDeviceIDExisted trả về boolean

đoạn này + đoạn device id iszero, viết thành 1 func khác `isDeviceIDExisted` trả về boolean
lqhoang99 commented 2021-11-05 09:12:15 +00:00 (Migrated from github.com)
Review

done

done
return errors.New("this device is already existed") return errors.New("this device is already existed")
} }

namhq1989 commented 2021-11-05 07:27:44 +00:00 (Migrated from github.com)
Review

DeviceCreate -> CreateOptions

DeviceCreate -> CreateOptions
namhq1989 commented 2021-11-05 07:27:44 +00:00 (Migrated from github.com)
Review

DeviceCreate -> CreateOptions

DeviceCreate -> CreateOptions
namhq1989 commented 2021-11-05 07:31:39 +00:00 (Migrated from github.com)
Review

deviceID already exists -> this device is already existed

deviceID already exists -> this device is already existed
namhq1989 commented 2021-11-05 07:31:39 +00:00 (Migrated from github.com)
Review

deviceID already exists -> this device is already existed

deviceID already exists -> this device is already existed
namhq1989 commented 2021-11-05 07:33:20 +00:00 (Migrated from github.com)
Review
return fmt.Errorf("error when create device: %s", err.Error())
```go return fmt.Errorf("error when create device: %s", err.Error()) ```
namhq1989 commented 2021-11-05 07:33:20 +00:00 (Migrated from github.com)
Review
return fmt.Errorf("error when create device: %s", err.Error())
```go return fmt.Errorf("error when create device: %s", err.Error()) ```
namhq1989 commented 2021-11-05 07:35:14 +00:00 (Migrated from github.com)
Review

move ra 1 func khác để validate

move ra 1 func khác để validate
namhq1989 commented 2021-11-05 07:35:14 +00:00 (Migrated from github.com)
Review

move ra 1 func khác để validate

move ra 1 func khác để validate
namhq1989 commented 2021-11-05 07:35:31 +00:00 (Migrated from github.com)
Review

move ra 1 func khác để validate

move ra 1 func khác để validate
namhq1989 commented 2021-11-05 07:35:31 +00:00 (Migrated from github.com)
Review

move ra 1 func khác để validate

move ra 1 func khác để validate
namhq1989 commented 2021-11-05 07:35:53 +00:00 (Migrated from github.com)
Review

move ra 1 func khác để validate

move ra 1 func khác để validate
namhq1989 commented 2021-11-05 07:35:53 +00:00 (Migrated from github.com)
Review

move ra 1 func khác để validate

move ra 1 func khác để validate
namhq1989 commented 2021-11-05 07:36:56 +00:00 (Migrated from github.com)
Review

move ra 1 func khác để set, set cứng device.Language = langVi

move ra 1 func khác để set, set cứng `device.Language = langVi`
namhq1989 commented 2021-11-05 07:36:56 +00:00 (Migrated from github.com)
Review

move ra 1 func khác để set, set cứng device.Language = langVi

move ra 1 func khác để set, set cứng `device.Language = langVi`
namhq1989 commented 2021-11-05 07:37:25 +00:00 (Migrated from github.com)
Review

ko cần check userID là mongo id, ko empty là được

ko cần check userID là mongo id, ko empty là được
namhq1989 commented 2021-11-05 07:37:25 +00:00 (Migrated from github.com)
Review

ko cần check userID là mongo id, ko empty là được

ko cần check userID là mongo id, ko empty là được
namhq1989 commented 2021-11-05 07:37:32 +00:00 (Migrated from github.com)
Review

bỏ cái này

bỏ cái này
namhq1989 commented 2021-11-05 07:37:32 +00:00 (Migrated from github.com)
Review

bỏ cái này

bỏ cái này
lqhoang99 commented 2021-11-05 08:32:48 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:32:48 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:33:15 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:33:15 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:33:21 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:33:21 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:33:28 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:33:28 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:33:54 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:33:54 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:34:00 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:34:00 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:34:13 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:34:13 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:34:23 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:34:23 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:34:30 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 08:34:30 +00:00 (Migrated from github.com)
Review

done

done
namhq1989 commented 2021-11-05 08:58:38 +00:00 (Migrated from github.com)
Review

đoạn này + đoạn device id iszero, viết thành 1 func khác isDeviceIDExisted trả về boolean

đoạn này + đoạn device id iszero, viết thành 1 func khác `isDeviceIDExisted` trả về boolean
namhq1989 commented 2021-11-05 08:58:38 +00:00 (Migrated from github.com)
Review

đoạn này + đoạn device id iszero, viết thành 1 func khác isDeviceIDExisted trả về boolean

đoạn này + đoạn device id iszero, viết thành 1 func khác `isDeviceIDExisted` trả về boolean
lqhoang99 commented 2021-11-05 09:12:15 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 09:12:15 +00:00 (Migrated from github.com)
Review

done

done

View File

@ -1,9 +1,12 @@
namhq1989 commented 2021-11-05 09:17:08 +00:00 (Migrated from github.com)
Review

gom code khúc này thành return !device.ID.IsZero()

func này check device có tồn tại ko, nên nếu tồn tại trả true, ko tồn tại trả false

gom code khúc này thành `return !device.ID.IsZero()` func này check device có tồn tại ko, nên nếu tồn tại trả true, ko tồn tại trả false
namhq1989 commented 2021-11-05 09:17:08 +00:00 (Migrated from github.com)
Review

gom code khúc này thành return !device.ID.IsZero()

func này check device có tồn tại ko, nên nếu tồn tại trả true, ko tồn tại trả false

gom code khúc này thành `return !device.ID.IsZero()` func này check device có tồn tại ko, nên nếu tồn tại trả true, ko tồn tại trả false
lqhoang99 commented 2021-11-05 09:25:11 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 09:25:11 +00:00 (Migrated from github.com)
Review

done

done
package devicemngmt package devicemngmt
import ( import (
"context"
namhq1989 commented 2021-11-05 09:17:08 +00:00 (Migrated from github.com)
Review

gom code khúc này thành return !device.ID.IsZero()

func này check device có tồn tại ko, nên nếu tồn tại trả true, ko tồn tại trả false

gom code khúc này thành `return !device.ID.IsZero()` func này check device có tồn tại ko, nên nếu tồn tại trả true, ko tồn tại trả false
lqhoang99 commented 2021-11-05 09:25:11 +00:00 (Migrated from github.com)
Review

done

done
"fmt" "fmt"
"github.com/Selly-Modules/logger"
namhq1989 commented 2021-11-05 09:17:08 +00:00 (Migrated from github.com)
Review

gom code khúc này thành return !device.ID.IsZero()

func này check device có tồn tại ko, nên nếu tồn tại trả true, ko tồn tại trả false

gom code khúc này thành `return !device.ID.IsZero()` func này check device có tồn tại ko, nên nếu tồn tại trả true, ko tồn tại trả false
lqhoang99 commented 2021-11-05 09:25:11 +00:00 (Migrated from github.com)
Review

done

done
ua "github.com/mssola/user_agent" ua "github.com/mssola/user_agent"
"go.mongodb.org/mongo-driver/bson"
namhq1989 commented 2021-11-05 09:17:08 +00:00 (Migrated from github.com)
Review

gom code khúc này thành return !device.ID.IsZero()

func này check device có tồn tại ko, nên nếu tồn tại trả true, ko tồn tại trả false

gom code khúc này thành `return !device.ID.IsZero()` func này check device có tồn tại ko, nên nếu tồn tại trả true, ko tồn tại trả false
lqhoang99 commented 2021-11-05 09:25:11 +00:00 (Migrated from github.com)
Review

done

done
"go.mongodb.org/mongo-driver/mongo" "go.mongodb.org/mongo-driver/mongo"
) )
@ -12,6 +15,25 @@ func (s Service) getDeviceCollection() *mongo.Collection {
namhq1989 commented 2021-11-05 09:17:08 +00:00 (Migrated from github.com)
Review

gom code khúc này thành return !device.ID.IsZero()

func này check device có tồn tại ko, nên nếu tồn tại trả true, ko tồn tại trả false

gom code khúc này thành `return !device.ID.IsZero()` func này check device có tồn tại ko, nên nếu tồn tại trả true, ko tồn tại trả false
namhq1989 commented 2021-11-05 09:17:08 +00:00 (Migrated from github.com)
Review

gom code khúc này thành return !device.ID.IsZero()

func này check device có tồn tại ko, nên nếu tồn tại trả true, ko tồn tại trả false

gom code khúc này thành `return !device.ID.IsZero()` func này check device có tồn tại ko, nên nếu tồn tại trả true, ko tồn tại trả false
lqhoang99 commented 2021-11-05 09:25:11 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 09:25:11 +00:00 (Migrated from github.com)
Review

done

done
return s.DB.Collection(fmt.Sprintf("%s-%s", s.TablePrefix, tableDevice)) return s.DB.Collection(fmt.Sprintf("%s-%s", s.TablePrefix, tableDevice))
} }
func (s Service) isDeviceIDExisted(ctx context.Context, deviceID string) bool {
namhq1989 commented 2021-11-05 09:17:08 +00:00 (Migrated from github.com)
Review

gom code khúc này thành return !device.ID.IsZero()

func này check device có tồn tại ko, nên nếu tồn tại trả true, ko tồn tại trả false

gom code khúc này thành `return !device.ID.IsZero()` func này check device có tồn tại ko, nên nếu tồn tại trả true, ko tồn tại trả false
lqhoang99 commented 2021-11-05 09:25:11 +00:00 (Migrated from github.com)
Review

done

done
var (
namhq1989 commented 2021-11-05 09:17:08 +00:00 (Migrated from github.com)
Review

gom code khúc này thành return !device.ID.IsZero()

func này check device có tồn tại ko, nên nếu tồn tại trả true, ko tồn tại trả false

gom code khúc này thành `return !device.ID.IsZero()` func này check device có tồn tại ko, nên nếu tồn tại trả true, ko tồn tại trả false
lqhoang99 commented 2021-11-05 09:25:11 +00:00 (Migrated from github.com)
Review

done

done
col = s.getDeviceCollection()
namhq1989 commented 2021-11-05 09:17:08 +00:00 (Migrated from github.com)
Review

gom code khúc này thành return !device.ID.IsZero()

func này check device có tồn tại ko, nên nếu tồn tại trả true, ko tồn tại trả false

gom code khúc này thành `return !device.ID.IsZero()` func này check device có tồn tại ko, nên nếu tồn tại trả true, ko tồn tại trả false
lqhoang99 commented 2021-11-05 09:25:11 +00:00 (Migrated from github.com)
Review

done

done
device = Device{}
namhq1989 commented 2021-11-05 09:17:08 +00:00 (Migrated from github.com)
Review

gom code khúc này thành return !device.ID.IsZero()

func này check device có tồn tại ko, nên nếu tồn tại trả true, ko tồn tại trả false

gom code khúc này thành `return !device.ID.IsZero()` func này check device có tồn tại ko, nên nếu tồn tại trả true, ko tồn tại trả false
lqhoang99 commented 2021-11-05 09:25:11 +00:00 (Migrated from github.com)
Review

done

done
)
namhq1989 commented 2021-11-05 09:17:08 +00:00 (Migrated from github.com)
Review

gom code khúc này thành return !device.ID.IsZero()

func này check device có tồn tại ko, nên nếu tồn tại trả true, ko tồn tại trả false

gom code khúc này thành `return !device.ID.IsZero()` func này check device có tồn tại ko, nên nếu tồn tại trả true, ko tồn tại trả false
lqhoang99 commented 2021-11-05 09:25:11 +00:00 (Migrated from github.com)
Review

done

done
namhq1989 commented 2021-11-05 09:17:08 +00:00 (Migrated from github.com)
Review

gom code khúc này thành return !device.ID.IsZero()

func này check device có tồn tại ko, nên nếu tồn tại trả true, ko tồn tại trả false

gom code khúc này thành `return !device.ID.IsZero()` func này check device có tồn tại ko, nên nếu tồn tại trả true, ko tồn tại trả false
lqhoang99 commented 2021-11-05 09:25:11 +00:00 (Migrated from github.com)
Review

done

done
if err := col.FindOne(ctx, bson.M{"deviceID": deviceID}).Decode(&device); err != nil {
namhq1989 commented 2021-11-05 09:17:08 +00:00 (Migrated from github.com)
Review

gom code khúc này thành return !device.ID.IsZero()

func này check device có tồn tại ko, nên nếu tồn tại trả true, ko tồn tại trả false

gom code khúc này thành `return !device.ID.IsZero()` func này check device có tồn tại ko, nên nếu tồn tại trả true, ko tồn tại trả false
lqhoang99 commented 2021-11-05 09:25:11 +00:00 (Migrated from github.com)
Review

done

done
logger.Error("devicemngt - findByDeviceID", logger.LogData{
namhq1989 commented 2021-11-05 09:17:08 +00:00 (Migrated from github.com)
Review

gom code khúc này thành return !device.ID.IsZero()

func này check device có tồn tại ko, nên nếu tồn tại trả true, ko tồn tại trả false

gom code khúc này thành `return !device.ID.IsZero()` func này check device có tồn tại ko, nên nếu tồn tại trả true, ko tồn tại trả false
lqhoang99 commented 2021-11-05 09:25:11 +00:00 (Migrated from github.com)
Review

done

done
"deviceID": deviceID,
namhq1989 commented 2021-11-05 09:17:08 +00:00 (Migrated from github.com)
Review

gom code khúc này thành return !device.ID.IsZero()

func này check device có tồn tại ko, nên nếu tồn tại trả true, ko tồn tại trả false

gom code khúc này thành `return !device.ID.IsZero()` func này check device có tồn tại ko, nên nếu tồn tại trả true, ko tồn tại trả false
lqhoang99 commented 2021-11-05 09:25:11 +00:00 (Migrated from github.com)
Review

done

done
"err": err.Error(),
namhq1989 commented 2021-11-05 09:17:08 +00:00 (Migrated from github.com)
Review

gom code khúc này thành return !device.ID.IsZero()

func này check device có tồn tại ko, nên nếu tồn tại trả true, ko tồn tại trả false

gom code khúc này thành `return !device.ID.IsZero()` func này check device có tồn tại ko, nên nếu tồn tại trả true, ko tồn tại trả false
lqhoang99 commented 2021-11-05 09:25:11 +00:00 (Migrated from github.com)
Review

done

done
})
namhq1989 commented 2021-11-05 09:15:34 +00:00 (Migrated from github.com)
Review

chỗ này return luôn chớ?

chỗ này return luôn chớ?
namhq1989 commented 2021-11-05 09:17:08 +00:00 (Migrated from github.com)
Review

gom code khúc này thành return !device.ID.IsZero()

func này check device có tồn tại ko, nên nếu tồn tại trả true, ko tồn tại trả false

gom code khúc này thành `return !device.ID.IsZero()` func này check device có tồn tại ko, nên nếu tồn tại trả true, ko tồn tại trả false
lqhoang99 commented 2021-11-05 09:25:11 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 09:25:18 +00:00 (Migrated from github.com)
Review

done

done
}
namhq1989 commented 2021-11-05 09:17:08 +00:00 (Migrated from github.com)
Review

gom code khúc này thành return !device.ID.IsZero()

func này check device có tồn tại ko, nên nếu tồn tại trả true, ko tồn tại trả false

gom code khúc này thành `return !device.ID.IsZero()` func này check device có tồn tại ko, nên nếu tồn tại trả true, ko tồn tại trả false
lqhoang99 commented 2021-11-05 09:25:11 +00:00 (Migrated from github.com)
Review

done

done
if !device.ID.IsZero() {
namhq1989 commented 2021-11-05 09:17:08 +00:00 (Migrated from github.com)
Review

gom code khúc này thành return !device.ID.IsZero()

func này check device có tồn tại ko, nên nếu tồn tại trả true, ko tồn tại trả false

gom code khúc này thành `return !device.ID.IsZero()` func này check device có tồn tại ko, nên nếu tồn tại trả true, ko tồn tại trả false
lqhoang99 commented 2021-11-05 09:25:11 +00:00 (Migrated from github.com)
Review

done

done
return true
namhq1989 commented 2021-11-05 09:17:08 +00:00 (Migrated from github.com)
Review

gom code khúc này thành return !device.ID.IsZero()

func này check device có tồn tại ko, nên nếu tồn tại trả true, ko tồn tại trả false

gom code khúc này thành `return !device.ID.IsZero()` func này check device có tồn tại ko, nên nếu tồn tại trả true, ko tồn tại trả false
lqhoang99 commented 2021-11-05 09:25:11 +00:00 (Migrated from github.com)
Review

done

done
}
namhq1989 commented 2021-11-05 09:17:08 +00:00 (Migrated from github.com)
Review

gom code khúc này thành return !device.ID.IsZero()

func này check device có tồn tại ko, nên nếu tồn tại trả true, ko tồn tại trả false

gom code khúc này thành `return !device.ID.IsZero()` func này check device có tồn tại ko, nên nếu tồn tại trả true, ko tồn tại trả false
lqhoang99 commented 2021-11-05 09:25:11 +00:00 (Migrated from github.com)
Review

done

done
namhq1989 commented 2021-11-05 09:17:08 +00:00 (Migrated from github.com)
Review

gom code khúc này thành return !device.ID.IsZero()

func này check device có tồn tại ko, nên nếu tồn tại trả true, ko tồn tại trả false

gom code khúc này thành `return !device.ID.IsZero()` func này check device có tồn tại ko, nên nếu tồn tại trả true, ko tồn tại trả false
lqhoang99 commented 2021-11-05 09:25:11 +00:00 (Migrated from github.com)
Review

done

done
return false
namhq1989 commented 2021-11-05 09:17:08 +00:00 (Migrated from github.com)
Review

gom code khúc này thành return !device.ID.IsZero()

func này check device có tồn tại ko, nên nếu tồn tại trả true, ko tồn tại trả false

gom code khúc này thành `return !device.ID.IsZero()` func này check device có tồn tại ko, nên nếu tồn tại trả true, ko tồn tại trả false
lqhoang99 commented 2021-11-05 09:25:11 +00:00 (Migrated from github.com)
Review

done

done
}
namhq1989 commented 2021-11-05 09:17:08 +00:00 (Migrated from github.com)
Review

gom code khúc này thành return !device.ID.IsZero()

func này check device có tồn tại ko, nên nếu tồn tại trả true, ko tồn tại trả false

gom code khúc này thành `return !device.ID.IsZero()` func này check device có tồn tại ko, nên nếu tồn tại trả true, ko tồn tại trả false
lqhoang99 commented 2021-11-05 09:25:11 +00:00 (Migrated from github.com)
Review

done

done
namhq1989 commented 2021-11-05 09:17:08 +00:00 (Migrated from github.com)
Review

gom code khúc này thành return !device.ID.IsZero()

func này check device có tồn tại ko, nên nếu tồn tại trả true, ko tồn tại trả false

gom code khúc này thành `return !device.ID.IsZero()` func này check device có tồn tại ko, nên nếu tồn tại trả true, ko tồn tại trả false
lqhoang99 commented 2021-11-05 09:25:11 +00:00 (Migrated from github.com)
Review

done

done
func getOSName(userAgent string) string { func getOSName(userAgent string) string {
uaData := ua.New(userAgent) uaData := ua.New(userAgent)
return uaData.OSInfo().Name return uaData.OSInfo().Name

namhq1989 commented 2021-11-05 09:17:08 +00:00 (Migrated from github.com)
Review

gom code khúc này thành return !device.ID.IsZero()

func này check device có tồn tại ko, nên nếu tồn tại trả true, ko tồn tại trả false

gom code khúc này thành `return !device.ID.IsZero()` func này check device có tồn tại ko, nên nếu tồn tại trả true, ko tồn tại trả false
namhq1989 commented 2021-11-05 09:17:08 +00:00 (Migrated from github.com)
Review

gom code khúc này thành return !device.ID.IsZero()

func này check device có tồn tại ko, nên nếu tồn tại trả true, ko tồn tại trả false

gom code khúc này thành `return !device.ID.IsZero()` func này check device có tồn tại ko, nên nếu tồn tại trả true, ko tồn tại trả false
lqhoang99 commented 2021-11-05 09:25:11 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 09:25:11 +00:00 (Migrated from github.com)
Review

done

done

View File

@ -9,7 +9,7 @@ import (
namhq1989 commented 2021-11-05 09:00:31 +00:00 (Migrated from github.com)
Review

deviceId, json dùng camel case, sửa luôn các id khác

deviceId, json dùng camel case, sửa luôn các id khác
namhq1989 commented 2021-11-05 09:00:31 +00:00 (Migrated from github.com)
Review

deviceId, json dùng camel case, sửa luôn các id khác

deviceId, json dùng camel case, sửa luôn các id khác
lqhoang99 commented 2021-11-05 09:12:09 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 09:12:09 +00:00 (Migrated from github.com)
Review

done

done
namhq1989 commented 2021-11-05 09:17:35 +00:00 (Migrated from github.com)
Review

LastActivatedAt

LastActivatedAt
namhq1989 commented 2021-11-05 09:17:35 +00:00 (Migrated from github.com)
Review

LastActivatedAt

LastActivatedAt
lqhoang99 commented 2021-11-05 09:25:07 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 09:25:07 +00:00 (Migrated from github.com)
Review

done

done
// Device ... // Device ...
type Device struct { type Device struct {
namhq1989 commented 2021-11-05 07:41:01 +00:00 (Migrated from github.com)
Review

define thêm json vào metadata

define thêm `json` vào metadata
lqhoang99 commented 2021-11-05 08:40:21 +00:00 (Migrated from github.com)
Review

done

done
ID primitive.ObjectID `bson:"_id" json:"_id"` ID primitive.ObjectID `bson:"_id" json:"_id"`
DeviceID string `bson:"deviceID" json:"deviceID"` // unique DeviceID string `bson:"deviceID" json:"deviceId"` // unique
namhq1989 commented 2021-11-05 09:00:31 +00:00 (Migrated from github.com)
Review

deviceId, json dùng camel case, sửa luôn các id khác

deviceId, json dùng camel case, sửa luôn các id khác
lqhoang99 commented 2021-11-05 09:12:09 +00:00 (Migrated from github.com)
Review

done

done
namhq1989 commented 2021-11-05 09:17:35 +00:00 (Migrated from github.com)
Review

LastActivatedAt

LastActivatedAt
lqhoang99 commented 2021-11-05 09:25:07 +00:00 (Migrated from github.com)
Review

done

done
namhq1989 commented 2021-11-05 09:00:31 +00:00 (Migrated from github.com)
Review

deviceId, json dùng camel case, sửa luôn các id khác

deviceId, json dùng camel case, sửa luôn các id khác
lqhoang99 commented 2021-11-05 09:12:09 +00:00 (Migrated from github.com)
Review

done

done
namhq1989 commented 2021-11-05 09:17:35 +00:00 (Migrated from github.com)
Review

LastActivatedAt

LastActivatedAt
lqhoang99 commented 2021-11-05 09:25:07 +00:00 (Migrated from github.com)
Review

done

done
IP string `bson:"ip" json:"ip"` IP string `bson:"ip" json:"ip"`
OSName string `bson:"osName" json:"osName"` OSName string `bson:"osName" json:"osName"`
OSVersion string `bson:"osVersion" json:"osVersion"` OSVersion string `bson:"osVersion" json:"osVersion"`
@ -17,7 +17,7 @@ type Device struct {
namhq1989 commented 2021-11-05 09:00:31 +00:00 (Migrated from github.com)
Review

deviceId, json dùng camel case, sửa luôn các id khác

deviceId, json dùng camel case, sửa luôn các id khác
namhq1989 commented 2021-11-05 09:00:31 +00:00 (Migrated from github.com)
Review

deviceId, json dùng camel case, sửa luôn các id khác

deviceId, json dùng camel case, sửa luôn các id khác
lqhoang99 commented 2021-11-05 09:12:09 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 09:12:09 +00:00 (Migrated from github.com)
Review

done

done
namhq1989 commented 2021-11-05 09:17:35 +00:00 (Migrated from github.com)
Review

LastActivatedAt

LastActivatedAt
namhq1989 commented 2021-11-05 09:17:35 +00:00 (Migrated from github.com)
Review

LastActivatedAt

LastActivatedAt
lqhoang99 commented 2021-11-05 09:25:07 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 09:25:07 +00:00 (Migrated from github.com)
Review

done

done
Language string `bson:"language" json:"language"` // vi, en Language string `bson:"language" json:"language"` // vi, en
IsMobile bool `bson:"isMobile" json:"isMobile"` IsMobile bool `bson:"isMobile" json:"isMobile"`
LastActivityAt time.Time `bson:"lastActivityAt" json:"lastActivityAt"` LastActivityAt time.Time `bson:"lastActivityAt" json:"lastActivityAt"`
UserID primitive.ObjectID `bson:"userID" json:"userID"` UserID primitive.ObjectID `bson:"userID" json:"userId"`
namhq1989 commented 2021-11-05 09:00:31 +00:00 (Migrated from github.com)
Review

deviceId, json dùng camel case, sửa luôn các id khác

deviceId, json dùng camel case, sửa luôn các id khác
lqhoang99 commented 2021-11-05 09:12:09 +00:00 (Migrated from github.com)
Review

done

done
namhq1989 commented 2021-11-05 09:17:35 +00:00 (Migrated from github.com)
Review

LastActivatedAt

LastActivatedAt
lqhoang99 commented 2021-11-05 09:25:07 +00:00 (Migrated from github.com)
Review

done

done
namhq1989 commented 2021-11-05 09:00:31 +00:00 (Migrated from github.com)
Review

deviceId, json dùng camel case, sửa luôn các id khác

deviceId, json dùng camel case, sửa luôn các id khác
lqhoang99 commented 2021-11-05 09:12:09 +00:00 (Migrated from github.com)
Review

done

done
namhq1989 commented 2021-11-05 09:17:35 +00:00 (Migrated from github.com)
Review

LastActivatedAt

LastActivatedAt
lqhoang99 commented 2021-11-05 09:25:07 +00:00 (Migrated from github.com)
Review

done

done
AuthToken string `bson:"authToken" json:"authToken"` AuthToken string `bson:"authToken" json:"authToken"`
FCMToken string `bson:"fcmToken" json:"fcmToken"` FCMToken string `bson:"fcmToken" json:"fcmToken"`
CreatedAt time.Time `bson:"createdAt" json:"createdAt"` CreatedAt time.Time `bson:"createdAt" json:"createdAt"`

namhq1989 commented 2021-11-05 09:00:31 +00:00 (Migrated from github.com)
Review

deviceId, json dùng camel case, sửa luôn các id khác

deviceId, json dùng camel case, sửa luôn các id khác
namhq1989 commented 2021-11-05 09:00:31 +00:00 (Migrated from github.com)
Review

deviceId, json dùng camel case, sửa luôn các id khác

deviceId, json dùng camel case, sửa luôn các id khác
lqhoang99 commented 2021-11-05 09:12:09 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 09:12:09 +00:00 (Migrated from github.com)
Review

done

done
namhq1989 commented 2021-11-05 09:17:35 +00:00 (Migrated from github.com)
Review

LastActivatedAt

LastActivatedAt
namhq1989 commented 2021-11-05 09:17:35 +00:00 (Migrated from github.com)
Review

LastActivatedAt

LastActivatedAt
lqhoang99 commented 2021-11-05 09:25:07 +00:00 (Migrated from github.com)
Review

done

done
lqhoang99 commented 2021-11-05 09:25:07 +00:00 (Migrated from github.com)
Review

done

done