MSP-2175 align func naming
This commit is contained in:
1 parent
c08782855b
commit
e65f5ac03c
8 files changed
+27
-37
No files matched your search
+2
-2
@@ -43,7 +43,7 @@ func NewAuth(authService authService, logger log.Logger) Auth {
|
||||
// @Failure 500 {object} domain.GrpcError
|
||||
// @Router /auth/logout [POST]
|
||||
func (a Auth) Logout(ctx context.Context, authData grpc.AuthData) error {
|
||||
adminId, err := getUserToken(authData)
|
||||
adminId, err := getAdminId(authData)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -113,7 +113,7 @@ func (a Auth) LoginWithSudir(ctx context.Context, request domain.LoginSudirReque
|
||||
}
|
||||
}
|
||||
|
||||
func getUserToken(authData grpc.AuthData) (int64, error) {
|
||||
func getAdminId(authData grpc.AuthData) (int64, error) {
|
||||
token, err := grpc.StringFromMd(domain.AdminAuthIdHeader, metadata.MD(authData))
|
||||
if err != nil {
|
||||
return 0, status.Error(codes.InvalidArgument, err.Error())
|
||||
|
||||
Reference in new issue
Block a user