diff options
Diffstat (limited to 'routes')
| -rw-r--r-- | routes/actor_profile_fragment.php | 7 | ||||
| -rw-r--r-- | routes/note_fragment.php | 2 |
2 files changed, 8 insertions, 1 deletions
diff --git a/routes/actor_profile_fragment.php b/routes/actor_profile_fragment.php index 0a07924..0a2a881 100644 --- a/routes/actor_profile_fragment.php +++ b/routes/actor_profile_fragment.php @@ -70,4 +70,11 @@ Router::getInstance()->mount('/fragment/profile', function (array $args) { } else { render_template('actor_profile_editable', ['actor' => $actor]); } +}); + +Router::getInstance()->mount('/fragment/profile/resetAvatar', function (array $args) { + $user = UserAccount::requireByCurrentSession(); + $user->actor->avatar = null; + $user->actor->save(); + render_template('actor_profile_reset_avatar', ['reset' => true]); });
\ No newline at end of file diff --git a/routes/note_fragment.php b/routes/note_fragment.php index 5fe979a..02399e6 100644 --- a/routes/note_fragment.php +++ b/routes/note_fragment.php @@ -84,5 +84,5 @@ Router::getInstance()->mount('/fragment/note', function (array $args) { $note->processTimelineAdditions(); $note->processNotifications(); } - render_template('write_note_form'); + render_template('write_note_form', ['actor' => $author->actor]); });
\ No newline at end of file |
