package auth_service

import "bwallet/models"

type Auth struct {
	Username string
	Password string
	Token    string
}

func (a *Auth) Check() (bool, error) {
	return models.CheckAuth(a.Username, a.Password)
}

func (a *Auth) GetUserInfo() (*models.Auth, error) {
	auth, err := models.GetUserInfo(a.Token)
	if err != nil {
		return nil, err
	}

	return auth, nil
}
