Add an API to reset the password
This commit is contained in:
		@@ -231,20 +231,6 @@ func (acc *Account) ResetPassword(ctx context.Context, emailConfig email.EmailCo
 | 
			
		||||
 | 
			
		||||
	acc.Data.UUID = string(userdata.Data["uuid"])
 | 
			
		||||
 | 
			
		||||
	conf := &rest.Config{
 | 
			
		||||
		Host:        "https://kubernetes.default.svc.cluster.local:443",
 | 
			
		||||
		BearerToken: acc.Token,
 | 
			
		||||
		TLSClientConfig: rest.TLSClientConfig{
 | 
			
		||||
			Insecure: true,
 | 
			
		||||
		},
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	clientset, err = kubernetes.NewForConfig(conf)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		logrus.Error(err, "Couldn't create a new clientset")
 | 
			
		||||
		return "", consts.ErrSystemError
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	secretName := "password-reset-code"
 | 
			
		||||
	number := encodeToString(6)
 | 
			
		||||
	secret := corev1.Secret{
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user