Merge pull request #5 from Selly-Modules/update-permission

[Update] Add method
This commit is contained in:
trunglt251292 2022-07-13 11:58:11 +07:00 committed by GitHub
commit 7890291403
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 0 deletions

View File

@ -1,6 +1,8 @@
package authentication package authentication
const ( const (
SubjectRequestGetSecretKey = "authentication.request.auth.get_key"
SubjectRequestNatsCheckPermission = "authentication.request.staff.check_permission" SubjectRequestNatsCheckPermission = "authentication.request.staff.check_permission"
SubjectRequestNatsGetPermission = "authentication.request.staff.list_permission" SubjectRequestNatsGetPermission = "authentication.request.staff.list_permission"
SubjectRequestNatsSyncStaff = "authentication.request.staff.sync_data" SubjectRequestNatsSyncStaff = "authentication.request.staff.sync_data"

View File

@ -53,3 +53,8 @@ func (Request) GetListLogs(payload *CommonQuery) (*Response, error) {
func (Request) GetTokenWithPhoneNumber(payload *GetTokenByPhoneBody) (*Response, error) { func (Request) GetTokenWithPhoneNumber(payload *GetTokenByPhoneBody) (*Response, error) {
return requestNats(SubjectRequestNatsGetTokenWithPhone, toBytes(payload)) return requestNats(SubjectRequestNatsGetTokenWithPhone, toBytes(payload))
} }
// GetSecretKeyAuth ...
func (Request) GetSecretKeyAuth() (*Response, error) {
return requestNats(SubjectRequestGetSecretKey, toBytes(""))
}