Return the user deletion status in /user

This commit is contained in:
kolaente 2021-08-07 15:36:44 +02:00
parent 5765502fbb
commit b2a861078f
Signed by: konrad
GPG Key ID: F40E70337AB24C9B

View File

@ -18,6 +18,7 @@ package v1
import ( import (
"net/http" "net/http"
"time"
"code.vikunja.io/api/pkg/user" "code.vikunja.io/api/pkg/user"
@ -33,6 +34,7 @@ import (
type userWithSettings struct { type userWithSettings struct {
user.User user.User
Settings *UserSettings `json:"settings"` Settings *UserSettings `json:"settings"`
DeletionScheduledAt time.Time `json:"deletion_scheduled_at"`
} }
// UserShow gets all informations about the current user // UserShow gets all informations about the current user
@ -71,6 +73,7 @@ func UserShow(c echo.Context) error {
DefaultListID: u.DefaultListID, DefaultListID: u.DefaultListID,
WeekStart: u.WeekStart, WeekStart: u.WeekStart,
}, },
DeletionScheduledAt: u.DeletionScheduledAt,
} }
return c.JSON(http.StatusOK, us) return c.JSON(http.StatusOK, us)