forked from AkkomaGang/akkoma
Document mix tasks
This commit is contained in:
parent
8221c56c48
commit
e1814bb322
3 changed files with 26 additions and 2 deletions
|
@ -1,9 +1,16 @@
|
||||||
defmodule Mix.Tasks.SetModerator do
|
defmodule Mix.Tasks.SetModerator do
|
||||||
|
@moduledoc """
|
||||||
|
Set moderator to a local user
|
||||||
|
|
||||||
|
Usage: ``mix set_moderator <username>``
|
||||||
|
|
||||||
|
Example: ``mix set_moderator lain``
|
||||||
|
"""
|
||||||
|
|
||||||
use Mix.Task
|
use Mix.Task
|
||||||
import Mix.Ecto
|
import Mix.Ecto
|
||||||
alias Pleroma.{Repo, User}
|
alias Pleroma.{Repo, User}
|
||||||
|
|
||||||
@shortdoc "Set moderator status"
|
|
||||||
def run([nickname | rest]) do
|
def run([nickname | rest]) do
|
||||||
Application.ensure_all_started(:pleroma)
|
Application.ensure_all_started(:pleroma)
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,12 @@
|
||||||
defmodule Mix.Tasks.RegisterUser do
|
defmodule Mix.Tasks.RegisterUser do
|
||||||
|
@moduledoc """
|
||||||
|
Manually register a local user
|
||||||
|
|
||||||
|
Usage: ``mix register_user <name> <nickname> <email> <bio> <password>``
|
||||||
|
|
||||||
|
Example: ``mix register_user 仮面の告白 lain lain@example.org "blushy-crushy fediverse idol + pleroma dev" pleaseDontHeckLain``
|
||||||
|
"""
|
||||||
|
|
||||||
use Mix.Task
|
use Mix.Task
|
||||||
alias Pleroma.{Repo, User}
|
alias Pleroma.{Repo, User}
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,18 @@
|
||||||
defmodule Mix.Tasks.SetLocked do
|
defmodule Mix.Tasks.SetLocked do
|
||||||
|
@moduledoc """
|
||||||
|
Lock a local user
|
||||||
|
|
||||||
|
The local user will then have to manually accept/reject followers. This can also be done by the user into their settings.
|
||||||
|
|
||||||
|
Usage: ``mix set_locked <username>``
|
||||||
|
|
||||||
|
Example: ``mix set_locked lain``
|
||||||
|
"""
|
||||||
|
|
||||||
use Mix.Task
|
use Mix.Task
|
||||||
import Mix.Ecto
|
import Mix.Ecto
|
||||||
alias Pleroma.{Repo, User}
|
alias Pleroma.{Repo, User}
|
||||||
|
|
||||||
@shortdoc "Set locked status"
|
|
||||||
def run([nickname | rest]) do
|
def run([nickname | rest]) do
|
||||||
ensure_started(Repo, [])
|
ensure_started(Repo, [])
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue