Allow admins request user backups
This commit is contained in:
parent
7fdd81d000
commit
7c22c9afb4
6 changed files with 57 additions and 12 deletions
|
|
@ -30,12 +30,12 @@ defmodule Pleroma.Backup do
|
|||
timestamps()
|
||||
end
|
||||
|
||||
def create(user) do
|
||||
def create(user, admin_user_id \\ nil) do
|
||||
with :ok <- validate_email_enabled(),
|
||||
:ok <- validate_user_email(user),
|
||||
:ok <- validate_limit(user),
|
||||
{:ok, backup} <- user |> new() |> Repo.insert() do
|
||||
BackupWorker.process(backup)
|
||||
BackupWorker.process(backup, admin_user_id)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue