add createMethod #2

Merged
lqhoang99 merged 4 commits from feature/createMethod into master 2021-11-05 09:28:06 +00:00
7 changed files with 112 additions and 99 deletions
Showing only changes of commit 6e0eb8b415 - Show all commits

View File

@ -3,31 +3,38 @@ package devicemngmt
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
import (
"context"
"errors"
"fmt"
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
"github.com/Selly-Modules/logger"
"github.com/Selly-Modules/mongodb"
ua "github.com/mssola/user_agent"
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
"go.mongodb.org/mongo-driver/bson"
)
// DeviceCreate ...
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
type DeviceCreate struct {
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 ...
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
type CreateOptions struct {
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 string
UserID string
UserAgent string
AppVersion string
IP string
FCMToken string
AuthToken string
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:30:27 +00:00 (Migrated from github.com)
Review

thiếu AuthToken

thiếu AuthToken
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:32:59 +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
Language string
}
// Create ...
func (s Service) Create(payload DeviceCreate) 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
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: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
var (
col = s.getDeviceCollection()
ctx = context.Background()
)
// Validate payload
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 := payload.validate()
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 != 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
return err
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
// New device data from payload
deviceData, err := payload.newDevice()
if err != nil {
@ -43,7 +50,7 @@ func (s Service) Create(payload DeviceCreate) 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
})
}
if !device.ID.IsZero() {
return errors.New("deviceID already exists")
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")
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
}
// Create device
@ -53,78 +60,33 @@ func (s Service) Create(payload DeviceCreate) 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
"doc": deviceData,
"err": err.Error(),
})
return errors.New("create device fail")
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 fmt.Errorf("error when create device: %s", 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
}
return nil
}
func (payload DeviceCreate) newDevice() (result Device, 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
func (payload CreateOptions) newDevice() (result Device, 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
timeNow := now()
device := Device{
ID: mongodb.NewObjectID(),
DeviceID: payload.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
OSName: getOSName(payload.UserAgent),
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
OSVersion: getOSVersion(payload.UserAgent),
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
IP: payload.IP,
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
Language: getLanguage(payload.Language),
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:05 +00:00 (Migrated from github.com)
Review

move ra 1 func khác để set

move ra 1 func khác để set
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:07 +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
AuthToken: payload.AuthToken,
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
LastActivityAt: timeNow,
CreatedAt: timeNow,
FCMToken: payload.FCMToken,
}
// Set 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
if payload.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
logger.Error("devicemngt - Create: no deviceID data", 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
"payload": payload,
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
err = errors.New("no deviceID data")
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
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.DeviceID = payload.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
// OSName, OSVersion
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 payload.UserAgent == "" {
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 - Create: no userAgent data", 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
"payload": payload,
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
err = errors.New("no userAgent data")
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
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
uaData := ua.New(payload.UserAgent)
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.OSName = uaData.OSInfo().Name
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.OSVersion = uaData.OSInfo().Version
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
// App version
if payload.AppVersion != "" {
device.AppVersion = payload.AppVersion
device.IsMobile = true
}
// IP
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 payload.IP == "" {
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 - Create: no ip data", 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
"payload": payload,
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
err = errors.New("no ip data")
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
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
// Language, default is vietnamese(vi)
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 payload.Language == "" {
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.Language = viLanguage
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
} else {
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.Language = enLanguage
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
// userIDe
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
userID, _ := mongodb.NewIDFromString(payload.UserID)
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 userID.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
logger.Error("devicemngt - Create: invalid userID data", 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
"payload": payload,
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
err = errors.New("invalid userID data")
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
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
// Generate authToken from userID
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.AuthToken = s.generateAuthToken(userID)
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
result = device
return
}

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,17 +0,0 @@
namhq1989 commented 2021-11-05 07:30:02 +00:00 (Migrated from github.com)
Review

device làm gì có generate token hè? generate token nằm ở bên User Management chớ

device làm gì có generate token hè? generate token nằm ở bên User Management chớ
namhq1989 commented 2021-11-05 07:30:02 +00:00 (Migrated from github.com)
Review

device làm gì có generate token hè? generate token nằm ở bên User Management chớ

device làm gì có generate token hè? generate token nằm ở bên User Management chớ
lqhoang99 commented 2021-11-05 08:32:54 +00:00 (Migrated from github.com)
Review

done

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

done

done
package devicemngmt
namhq1989 commented 2021-11-05 07:30:02 +00:00 (Migrated from github.com)
Review

device làm gì có generate token hè? generate token nằm ở bên User Management chớ

device làm gì có generate token hè? generate token nằm ở bên User Management chớ
lqhoang99 commented 2021-11-05 08:32:54 +00:00 (Migrated from github.com)
Review

done

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

device làm gì có generate token hè? generate token nằm ở bên User Management chớ

device làm gì có generate token hè? generate token nằm ở bên User Management chớ
lqhoang99 commented 2021-11-05 08:32:54 +00:00 (Migrated from github.com)
Review

done

done
import (
namhq1989 commented 2021-11-05 07:30:02 +00:00 (Migrated from github.com)
Review

device làm gì có generate token hè? generate token nằm ở bên User Management chớ

device làm gì có generate token hè? generate token nằm ở bên User Management chớ
lqhoang99 commented 2021-11-05 08:32:54 +00:00 (Migrated from github.com)
Review

done

done
"time"
namhq1989 commented 2021-11-05 07:30:02 +00:00 (Migrated from github.com)
Review

device làm gì có generate token hè? generate token nằm ở bên User Management chớ

device làm gì có generate token hè? generate token nằm ở bên User Management chớ
lqhoang99 commented 2021-11-05 08:32:54 +00:00 (Migrated from github.com)
Review

done

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

device làm gì có generate token hè? generate token nằm ở bên User Management chớ

device làm gì có generate token hè? generate token nằm ở bên User Management chớ
lqhoang99 commented 2021-11-05 08:32:54 +00:00 (Migrated from github.com)
Review

done

done
"github.com/dgrijalva/jwt-go"
namhq1989 commented 2021-11-05 07:30:02 +00:00 (Migrated from github.com)
Review

device làm gì có generate token hè? generate token nằm ở bên User Management chớ

device làm gì có generate token hè? generate token nằm ở bên User Management chớ
lqhoang99 commented 2021-11-05 08:32:54 +00:00 (Migrated from github.com)
Review

done

done
"go.mongodb.org/mongo-driver/bson/primitive"
namhq1989 commented 2021-11-05 07:30:02 +00:00 (Migrated from github.com)
Review

device làm gì có generate token hè? generate token nằm ở bên User Management chớ

device làm gì có generate token hè? generate token nằm ở bên User Management chớ
lqhoang99 commented 2021-11-05 08:32:54 +00:00 (Migrated from github.com)
Review

done

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

device làm gì có generate token hè? generate token nằm ở bên User Management chớ

device làm gì có generate token hè? generate token nằm ở bên User Management chớ
lqhoang99 commented 2021-11-05 08:32:54 +00:00 (Migrated from github.com)
Review

done

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

device làm gì có generate token hè? generate token nằm ở bên User Management chớ

device làm gì có generate token hè? generate token nằm ở bên User Management chớ
lqhoang99 commented 2021-11-05 08:32:54 +00:00 (Migrated from github.com)
Review

done

done
func (s Service) generateAuthToken(userID primitive.ObjectID) string {
namhq1989 commented 2021-11-05 07:30:02 +00:00 (Migrated from github.com)
Review

device làm gì có generate token hè? generate token nằm ở bên User Management chớ

device làm gì có generate token hè? generate token nằm ở bên User Management chớ
lqhoang99 commented 2021-11-05 08:32:54 +00:00 (Migrated from github.com)
Review

done

done
token := jwt.NewWithClaims(jwt.SigningMethodHS256, jwt.MapClaims{
namhq1989 commented 2021-11-05 07:30:02 +00:00 (Migrated from github.com)
Review

device làm gì có generate token hè? generate token nằm ở bên User Management chớ

device làm gì có generate token hè? generate token nằm ở bên User Management chớ
lqhoang99 commented 2021-11-05 08:32:54 +00:00 (Migrated from github.com)
Review

done

done
"_id": userID,
namhq1989 commented 2021-11-05 07:30:02 +00:00 (Migrated from github.com)
Review

device làm gì có generate token hè? generate token nằm ở bên User Management chớ

device làm gì có generate token hè? generate token nằm ở bên User Management chớ
lqhoang99 commented 2021-11-05 08:32:54 +00:00 (Migrated from github.com)
Review

done

done
"exp": now().Add(time.Second * 15552000).Unix(), // 6 months
namhq1989 commented 2021-11-05 07:30:02 +00:00 (Migrated from github.com)
Review

device làm gì có generate token hè? generate token nằm ở bên User Management chớ

device làm gì có generate token hè? generate token nằm ở bên User Management chớ
lqhoang99 commented 2021-11-05 08:32:54 +00:00 (Migrated from github.com)
Review

done

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

device làm gì có generate token hè? generate token nằm ở bên User Management chớ

device làm gì có generate token hè? generate token nằm ở bên User Management chớ
lqhoang99 commented 2021-11-05 08:32:54 +00:00 (Migrated from github.com)
Review

done

done
tokenString, _ := token.SignedString([]byte(s.AuthSecret))
namhq1989 commented 2021-11-05 07:30:02 +00:00 (Migrated from github.com)
Review

device làm gì có generate token hè? generate token nằm ở bên User Management chớ

device làm gì có generate token hè? generate token nằm ở bên User Management chớ
lqhoang99 commented 2021-11-05 08:32:54 +00:00 (Migrated from github.com)
Review

done

done
return tokenString
namhq1989 commented 2021-11-05 07:30:02 +00:00 (Migrated from github.com)
Review

device làm gì có generate token hè? generate token nằm ở bên User Management chớ

device làm gì có generate token hè? generate token nằm ở bên User Management chớ
lqhoang99 commented 2021-11-05 08:32:54 +00:00 (Migrated from github.com)
Review

done

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

device làm gì có generate token hè? generate token nằm ở bên User Management chớ

device làm gì có generate token hè? generate token nằm ở bên User Management chớ
lqhoang99 commented 2021-11-05 08:32:54 +00:00 (Migrated from github.com)
Review

done

done

View File

@ -2,10 +2,10 @@ package devicemngmt
namhq1989 commented 2021-11-05 07:37:49 +00:00 (Migrated from github.com)
Review

ko public cái này

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

ko public cái này

ko public cái này
namhq1989 commented 2021-11-05 07:38:14 +00:00 (Migrated from github.com)
Review
langVi = "vi"
langEn = "en"
```go langVi = "vi" langEn = "en" ```
namhq1989 commented 2021-11-05 07:38:14 +00:00 (Migrated from github.com)
Review
langVi = "vi"
langEn = "en"
```go langVi = "vi" langEn = "en" ```
lqhoang99 commented 2021-11-05 08:34:37 +00:00 (Migrated from github.com)
Review

done

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

done

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

done

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

done

done
// Constant ...
const (
TableDevice = "devices"
namhq1989 commented 2021-11-05 07:37:49 +00:00 (Migrated from github.com)
Review

ko public cái này

ko public cái này
namhq1989 commented 2021-11-05 07:38:14 +00:00 (Migrated from github.com)
Review
langVi = "vi"
langEn = "en"
```go langVi = "vi" langEn = "en" ```
lqhoang99 commented 2021-11-05 08:34:37 +00:00 (Migrated from github.com)
Review

done

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

done

done
tableDevice = "devices"
namhq1989 commented 2021-11-05 07:37:49 +00:00 (Migrated from github.com)
Review

ko public cái này

ko public cái này
namhq1989 commented 2021-11-05 07:38:14 +00:00 (Migrated from github.com)
Review
langVi = "vi"
langEn = "en"
```go langVi = "vi" langEn = "en" ```
lqhoang99 commented 2021-11-05 08:34:37 +00:00 (Migrated from github.com)
Review

done

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

done

done
timezoneHCM = "Asia/Ho_Chi_Minh"
viLanguage = "vi"
namhq1989 commented 2021-11-05 07:37:49 +00:00 (Migrated from github.com)
Review

ko public cái này

ko public cái này
namhq1989 commented 2021-11-05 07:38:14 +00:00 (Migrated from github.com)
Review
langVi = "vi"
langEn = "en"
```go langVi = "vi" langEn = "en" ```
lqhoang99 commented 2021-11-05 08:34:37 +00:00 (Migrated from github.com)
Review

done

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

done

done
enLanguage = "en"
namhq1989 commented 2021-11-05 07:37:49 +00:00 (Migrated from github.com)
Review

ko public cái này

ko public cái này
namhq1989 commented 2021-11-05 07:38:14 +00:00 (Migrated from github.com)
Review
langVi = "vi"
langEn = "en"
```go langVi = "vi" langEn = "en" ```
lqhoang99 commented 2021-11-05 08:34:37 +00:00 (Migrated from github.com)
Review

done

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

done

done
langVi = "vi"
namhq1989 commented 2021-11-05 07:37:49 +00:00 (Migrated from github.com)
Review

ko public cái này

ko public cái này
namhq1989 commented 2021-11-05 07:38:14 +00:00 (Migrated from github.com)
Review
langVi = "vi"
langEn = "en"
```go langVi = "vi" langEn = "en" ```
lqhoang99 commented 2021-11-05 08:34:37 +00:00 (Migrated from github.com)
Review

done

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

done

done
langEn = "en"
namhq1989 commented 2021-11-05 07:37:49 +00:00 (Migrated from github.com)
Review

ko public cái này

ko public cái này
namhq1989 commented 2021-11-05 07:38:14 +00:00 (Migrated from github.com)
Review
langVi = "vi"
langEn = "en"
```go langVi = "vi" langEn = "en" ```
lqhoang99 commented 2021-11-05 08:34:37 +00:00 (Migrated from github.com)
Review

done

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

done

done
)

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

ko public cái này

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

ko public cái này

ko public cái này
namhq1989 commented 2021-11-05 07:38:14 +00:00 (Migrated from github.com)
Review
langVi = "vi"
langEn = "en"
```go langVi = "vi" langEn = "en" ```
namhq1989 commented 2021-11-05 07:38:14 +00:00 (Migrated from github.com)
Review
langVi = "vi"
langEn = "en"
```go langVi = "vi" langEn = "en" ```
lqhoang99 commented 2021-11-05 08:34:37 +00:00 (Migrated from github.com)
Review

done

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

done

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

done

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

done

done

View File

@ -19,8 +19,6 @@ type Config struct {
namhq1989 commented 2021-11-05 07:38:42 +00:00 (Migrated from github.com)
Review

bỏ cái này

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

bỏ cái này

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

return thêm Service về nữa

func Init(config Config) (*Service, error) {
  // ...
  return s, nil
}
return thêm Service về nữa ```go func Init(config Config) (*Service, error) { // ... return s, nil } ```
namhq1989 commented 2021-11-05 07:39:37 +00:00 (Migrated from github.com)
Review

return thêm Service về nữa

func Init(config Config) (*Service, error) {
  // ...
  return s, nil
}
return thêm Service về nữa ```go func Init(config Config) (*Service, error) { // ... return s, nil } ```
lqhoang99 commented 2021-11-05 08:34:50 +00:00 (Migrated from github.com)
Review

done

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

done

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

done

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

done

done
MongoDB MongoDBConfig
// Table prefix, each service has its own prefix
TablePrefix string
// Auth secret, used to sign token
namhq1989 commented 2021-11-05 07:38:42 +00:00 (Migrated from github.com)
Review

bỏ cái này

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

return thêm Service về nữa

func Init(config Config) (*Service, error) {
  // ...
  return s, nil
}
return thêm Service về nữa ```go func Init(config Config) (*Service, error) { // ... return s, nil } ```
lqhoang99 commented 2021-11-05 08:34:50 +00:00 (Migrated from github.com)
Review

done

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

done

done
AuthSecret string
namhq1989 commented 2021-11-05 07:38:42 +00:00 (Migrated from github.com)
Review

bỏ cái này

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

return thêm Service về nữa

func Init(config Config) (*Service, error) {
  // ...
  return s, nil
}
return thêm Service về nữa ```go func Init(config Config) (*Service, error) { // ... return s, nil } ```
lqhoang99 commented 2021-11-05 08:34:50 +00:00 (Migrated from github.com)
Review

done

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

done

done
}
// Service ...
@ -32,9 +30,9 @@ type Service struct {
namhq1989 commented 2021-11-05 07:38:42 +00:00 (Migrated from github.com)
Review

bỏ cái này

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

bỏ cái này

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

return thêm Service về nữa

func Init(config Config) (*Service, error) {
  // ...
  return s, nil
}
return thêm Service về nữa ```go func Init(config Config) (*Service, error) { // ... return s, nil } ```
namhq1989 commented 2021-11-05 07:39:37 +00:00 (Migrated from github.com)
Review

return thêm Service về nữa

func Init(config Config) (*Service, error) {
  // ...
  return s, nil
}
return thêm Service về nữa ```go func Init(config Config) (*Service, error) { // ... return s, nil } ```
lqhoang99 commented 2021-11-05 08:34:50 +00:00 (Migrated from github.com)
Review

done

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

done

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

done

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

done

done
var s *Service
// Init ...
func Init(config Config) error {
namhq1989 commented 2021-11-05 07:38:42 +00:00 (Migrated from github.com)
Review

bỏ cái này

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

return thêm Service về nữa

func Init(config Config) (*Service, error) {
  // ...
  return s, nil
}
return thêm Service về nữa ```go func Init(config Config) (*Service, error) { // ... return s, nil } ```
lqhoang99 commented 2021-11-05 08:34:50 +00:00 (Migrated from github.com)
Review

done

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

done

done
if config.MongoDB.Host == "" || config.TablePrefix == "" || config.AuthSecret == "" {
namhq1989 commented 2021-11-05 07:38:42 +00:00 (Migrated from github.com)
Review

bỏ cái này

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

return thêm Service về nữa

func Init(config Config) (*Service, error) {
  // ...
  return s, nil
}
return thêm Service về nữa ```go func Init(config Config) (*Service, error) { // ... return s, nil } ```
lqhoang99 commented 2021-11-05 08:34:50 +00:00 (Migrated from github.com)
Review

done

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

done

done
return errors.New("please provide all necessary information for init device")
namhq1989 commented 2021-11-05 07:38:42 +00:00 (Migrated from github.com)
Review

bỏ cái này

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

return thêm Service về nữa

func Init(config Config) (*Service, error) {
  // ...
  return s, nil
}
return thêm Service về nữa ```go func Init(config Config) (*Service, error) { // ... return s, nil } ```
lqhoang99 commented 2021-11-05 08:34:50 +00:00 (Migrated from github.com)
Review

done

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

done

done
func Init(config Config) (*Service, error) {
namhq1989 commented 2021-11-05 07:38:42 +00:00 (Migrated from github.com)
Review

bỏ cái này

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

return thêm Service về nữa

func Init(config Config) (*Service, error) {
  // ...
  return s, nil
}
return thêm Service về nữa ```go func Init(config Config) (*Service, error) { // ... return s, nil } ```
lqhoang99 commented 2021-11-05 08:34:50 +00:00 (Migrated from github.com)
Review

done

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

done

done
if config.MongoDB.Host == "" || config.TablePrefix == "" {
namhq1989 commented 2021-11-05 07:38:42 +00:00 (Migrated from github.com)
Review

bỏ cái này

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

return thêm Service về nữa

func Init(config Config) (*Service, error) {
  // ...
  return s, nil
}
return thêm Service về nữa ```go func Init(config Config) (*Service, error) { // ... return s, nil } ```
lqhoang99 commented 2021-11-05 08:34:50 +00:00 (Migrated from github.com)
Review

done

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

done

done
return nil, errors.New("please provide all necessary information for init device")
namhq1989 commented 2021-11-05 07:38:42 +00:00 (Migrated from github.com)
Review

bỏ cái này

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

return thêm Service về nữa

func Init(config Config) (*Service, error) {
  // ...
  return s, nil
}
return thêm Service về nữa ```go func Init(config Config) (*Service, error) { // ... return s, nil } ```
lqhoang99 commented 2021-11-05 08:34:50 +00:00 (Migrated from github.com)
Review

done

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

done

done
}
// Connect MongoDB
@ -48,7 +46,7 @@ func Init(config Config) error {
namhq1989 commented 2021-11-05 07:38:42 +00:00 (Migrated from github.com)
Review

bỏ cái này

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

bỏ cái này

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

return thêm Service về nữa

func Init(config Config) (*Service, error) {
  // ...
  return s, nil
}
return thêm Service về nữa ```go func Init(config Config) (*Service, error) { // ... return s, nil } ```
namhq1989 commented 2021-11-05 07:39:37 +00:00 (Migrated from github.com)
Review

return thêm Service về nữa

func Init(config Config) (*Service, error) {
  // ...
  return s, nil
}
return thêm Service về nữa ```go func Init(config Config) (*Service, error) { // ... return s, nil } ```
lqhoang99 commented 2021-11-05 08:34:50 +00:00 (Migrated from github.com)
Review

done

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

done

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

done

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

done

done
)
if err != nil {
fmt.Println("Cannot init module DEVICE MANAGEMENT", err)
return err
namhq1989 commented 2021-11-05 07:38:42 +00:00 (Migrated from github.com)
Review

bỏ cái này

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

return thêm Service về nữa

func Init(config Config) (*Service, error) {
  // ...
  return s, nil
}
return thêm Service về nữa ```go func Init(config Config) (*Service, error) { // ... return s, nil } ```
lqhoang99 commented 2021-11-05 08:34:50 +00:00 (Migrated from github.com)
Review

done

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

done

done
return nil, err
namhq1989 commented 2021-11-05 07:38:42 +00:00 (Migrated from github.com)
Review

bỏ cái này

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

return thêm Service về nữa

func Init(config Config) (*Service, error) {
  // ...
  return s, nil
}
return thêm Service về nữa ```go func Init(config Config) (*Service, error) { // ... return s, nil } ```
lqhoang99 commented 2021-11-05 08:34:50 +00:00 (Migrated from github.com)
Review

done

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

done

done
}
s = &Service{
@ -56,7 +54,7 @@ func Init(config Config) error {
namhq1989 commented 2021-11-05 07:38:42 +00:00 (Migrated from github.com)
Review

bỏ cái này

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

bỏ cái này

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

return thêm Service về nữa

func Init(config Config) (*Service, error) {
  // ...
  return s, nil
}
return thêm Service về nữa ```go func Init(config Config) (*Service, error) { // ... return s, nil } ```
namhq1989 commented 2021-11-05 07:39:37 +00:00 (Migrated from github.com)
Review

return thêm Service về nữa

func Init(config Config) (*Service, error) {
  // ...
  return s, nil
}
return thêm Service về nữa ```go func Init(config Config) (*Service, error) { // ... return s, nil } ```
lqhoang99 commented 2021-11-05 08:34:50 +00:00 (Migrated from github.com)
Review

done

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

done

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

done

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

done

done
DB: db,
}
return nil
namhq1989 commented 2021-11-05 07:38:42 +00:00 (Migrated from github.com)
Review

bỏ cái này

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

return thêm Service về nữa

func Init(config Config) (*Service, error) {
  // ...
  return s, nil
}
return thêm Service về nữa ```go func Init(config Config) (*Service, error) { // ... return s, nil } ```
lqhoang99 commented 2021-11-05 08:34:50 +00:00 (Migrated from github.com)
Review

done

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

done

done
return s, nil
namhq1989 commented 2021-11-05 07:38:42 +00:00 (Migrated from github.com)
Review

bỏ cái này

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

return thêm Service về nữa

func Init(config Config) (*Service, error) {
  // ...
  return s, nil
}
return thêm Service về nữa ```go func Init(config Config) (*Service, error) { // ... return s, nil } ```
lqhoang99 commented 2021-11-05 08:34:50 +00:00 (Migrated from github.com)
Review

done

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

done

done
}
// GetInstance ...

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

bỏ cái này

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

bỏ cái này

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

return thêm Service về nữa

func Init(config Config) (*Service, error) {
  // ...
  return s, nil
}
return thêm Service về nữa ```go func Init(config Config) (*Service, error) { // ... return s, nil } ```
namhq1989 commented 2021-11-05 07:39:37 +00:00 (Migrated from github.com)
Review

return thêm Service về nữa

func Init(config Config) (*Service, error) {
  // ...
  return s, nil
}
return thêm Service về nữa ```go func Init(config Config) (*Service, error) { // ... return s, nil } ```
lqhoang99 commented 2021-11-05 08:34:50 +00:00 (Migrated from github.com)
Review

done

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

done

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

done

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

done

done

View File

@ -3,10 +3,29 @@ package devicemngmt
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
import (
"fmt"
ua "github.com/mssola/user_agent"
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"
)
// getDeviceCollection ...
func (s Service) getDeviceCollection() *mongo.Collection {
return s.DB.Collection(fmt.Sprintf("%s-%s", s.TablePrefix, TableDevice))
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 s.DB.Collection(fmt.Sprintf("%s-%s", s.TablePrefix, tableDevice))
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 {
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
uaData := ua.New(userAgent)
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 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
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 getOSVersion(userAgent string) string {
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
uaData := ua.New(userAgent)
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 uaData.OSInfo().Version
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 getLanguage(lang string) string {
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
// Language, default is vietnamese(vi)
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 lang == langEn {
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 langEn
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
return langVi
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
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

@ -8,17 +8,17 @@ 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 ...
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"`
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
DeviceID string `bson:"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
IP string `bson:"ip"`
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
OSName string `bson:"osName"`
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
OSVersion string `bson:"osVersion"`
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
AppVersion string `bson:"appVersion"`
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
Language string `bson:"language"` // vi, en
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
IsMobile bool `bson:"isMobile"`
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
LastActivityAt time.Time `bson:"lastActivityAt"`
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
UserID primitive.ObjectID `bson:"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
AuthToken string `bson:"authToken"`
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
FCMToken string `bson:"fcmToken"`
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
CreatedAt time.Time `bson:"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
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
ID primitive.ObjectID `bson:"_id" json:"_id"`
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
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
IP string `bson:"ip" json:"ip"`
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
OSName string `bson:"osName" json:"osName"`
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
OSVersion string `bson:"osVersion" json:"osVersion"`
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
AppVersion string `bson:"appVersion" json:"appVersion"`
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
Language string `bson:"language" json:"language"` // vi, en
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
IsMobile bool `bson:"isMobile" json:"isMobile"`
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
LastActivityAt time.Time `bson:"lastActivityAt" json:"lastActivityAt"`
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
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
AuthToken string `bson:"authToken" json:"authToken"`
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
FCMToken string `bson:"fcmToken" json:"fcmToken"`
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
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
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
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

51
validate.go Normal file
View File

@ -0,0 +1,51 @@
package devicemngmt
import (
"errors"
"github.com/Selly-Modules/logger"
)
func (co CreateOptions) validate() error{
// DeviceID
if co.DeviceID == "" {
logger.Error("devicemngt - Create: no deviceID data", logger.LogData{
"payload": co,
})
return errors.New("no deviceID data")
}
// UserAgent
if co.UserAgent == "" {
logger.Error("devicemngt - Create: no userAgent data", logger.LogData{
"payload": co,
})
return errors.New("no userAgent data")
}
// IP
if co.IP == "" {
logger.Error("devicemngt - Create: no ip data", logger.LogData{
"payload": co,
})
return errors.New("no ip data")
}
// UserID
if co.UserID == "" {
logger.Error("devicemngt - Create: no userID data", logger.LogData{
"payload": co,
})
return errors.New("no userID data")
}
// AuthToken
if co.AuthToken == "" {
logger.Error("devicemngt - Create: no authToken data", logger.LogData{
"payload": co,
})
return errors.New("no authToken data")
}
return nil
}