1
0

Add email reminders (#743)

Fix tests

Expose email reminder setting through jwt

Set reminders on by default

Fix lint

Make user email configurable

Expose email reminder setting through /info

Don't try to send any reminders if none were found

More spacing for buttons

Fix db time format

Enable reminders by default

Make emails look more like the frontend

Add config to disable it

Add sending emaisl

Add getting all task users and reminding them

Add getting the next reminder in a cron

Move task reminder to separate file

Add cron

Co-authored-by: kolaente <k@knt.li>
Reviewed-on: https://kolaente.dev/vikunja/api/pulls/743
Co-Authored-By: konrad <konrad@kola-entertainments.de>
Co-Committed-By: konrad <konrad@kola-entertainments.de>
This commit is contained in:
konrad
2020-12-18 23:21:17 +00:00
parent 7dc2abb8e5
commit b2e4fde63a
30 changed files with 568 additions and 239 deletions

View File

@ -6296,14 +6296,13 @@ var doc = `{
}
}
},
"/user/settings/name": {
"/user/settings/general": {
"post": {
"security": [
{
"JWTKeyAuth": []
}
],
"description": "Changes the current user's name. It is also possible to reset the name.",
"consumes": [
"application/json"
],
@ -6313,15 +6312,15 @@ var doc = `{
"tags": [
"user"
],
"summary": "Change the current user's name",
"summary": "Change general user settings of the current user.",
"parameters": [
{
"description": "The updated user name",
"description": "The updated user settings",
"name": "avatar",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/v1.UserName"
"$ref": "#/definitions/v1.UserSettings"
}
}
],
@ -8008,15 +8007,6 @@ var doc = `{
}
}
},
"v1.UserName": {
"type": "object",
"properties": {
"name": {
"description": "The new name of the current user.",
"type": "string"
}
}
},
"v1.UserPassword": {
"type": "object",
"properties": {
@ -8028,6 +8018,19 @@ var doc = `{
}
}
},
"v1.UserSettings": {
"type": "object",
"properties": {
"email_reminders_enabled": {
"description": "If enabled, sends email reminders of tasks to the user.",
"type": "boolean"
},
"name": {
"description": "The new name of the current user.",
"type": "string"
}
}
},
"v1.authInfo": {
"type": "object",
"properties": {
@ -8090,6 +8093,9 @@ var doc = `{
"caldav_enabled": {
"type": "boolean"
},
"email_reminders_enabled": {
"type": "boolean"
},
"enabled_background_providers": {
"type": "array",
"items": {

View File

@ -6279,14 +6279,13 @@
}
}
},
"/user/settings/name": {
"/user/settings/general": {
"post": {
"security": [
{
"JWTKeyAuth": []
}
],
"description": "Changes the current user's name. It is also possible to reset the name.",
"consumes": [
"application/json"
],
@ -6296,15 +6295,15 @@
"tags": [
"user"
],
"summary": "Change the current user's name",
"summary": "Change general user settings of the current user.",
"parameters": [
{
"description": "The updated user name",
"description": "The updated user settings",
"name": "avatar",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/v1.UserName"
"$ref": "#/definitions/v1.UserSettings"
}
}
],
@ -7991,15 +7990,6 @@
}
}
},
"v1.UserName": {
"type": "object",
"properties": {
"name": {
"description": "The new name of the current user.",
"type": "string"
}
}
},
"v1.UserPassword": {
"type": "object",
"properties": {
@ -8011,6 +8001,19 @@
}
}
},
"v1.UserSettings": {
"type": "object",
"properties": {
"email_reminders_enabled": {
"description": "If enabled, sends email reminders of tasks to the user.",
"type": "boolean"
},
"name": {
"description": "The new name of the current user.",
"type": "string"
}
}
},
"v1.authInfo": {
"type": "object",
"properties": {
@ -8073,6 +8076,9 @@
"caldav_enabled": {
"type": "boolean"
},
"email_reminders_enabled": {
"type": "boolean"
},
"enabled_background_providers": {
"type": "array",
"items": {

View File

@ -947,12 +947,6 @@ definitions:
description: The avatar provider. Valid types are `gravatar` (uses the user email), `upload`, `initials`, `default`.
type: string
type: object
v1.UserName:
properties:
name:
description: The new name of the current user.
type: string
type: object
v1.UserPassword:
properties:
new_password:
@ -960,6 +954,15 @@ definitions:
old_password:
type: string
type: object
v1.UserSettings:
properties:
email_reminders_enabled:
description: If enabled, sends email reminders of tasks to the user.
type: boolean
name:
description: The new name of the current user.
type: string
type: object
v1.authInfo:
properties:
local:
@ -1000,6 +1003,8 @@ definitions:
type: array
caldav_enabled:
type: boolean
email_reminders_enabled:
type: boolean
enabled_background_providers:
items:
type: string
@ -5100,18 +5105,17 @@ paths:
summary: Update email address
tags:
- user
/user/settings/name:
/user/settings/general:
post:
consumes:
- application/json
description: Changes the current user's name. It is also possible to reset the name.
parameters:
- description: The updated user name
- description: The updated user settings
in: body
name: avatar
required: true
schema:
$ref: '#/definitions/v1.UserName'
$ref: '#/definitions/v1.UserSettings'
produces:
- application/json
responses:
@ -5129,7 +5133,7 @@ paths:
$ref: '#/definitions/models.Message'
security:
- JWTKeyAuth: []
summary: Change the current user's name
summary: Change general user settings of the current user.
tags:
- user
/user/settings/totp: