1
0
Fork 1
mirror of https://github.com/pixelfed/pixelfed.git synced 2024-12-23 08:14:10 +00:00

Update AccountInterstitialController, add autospam type

This commit is contained in:
Daniel Supernault 2020-12-10 22:11:02 -07:00
parent 401512c929
commit c67f0c5784
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -20,12 +20,14 @@ class AccountInterstitialController extends Controller
->interstitials()
->whereNull('read_at')
->first();
if(!$interstitial) {
$user = $request->user();
$user->has_interstitial = false;
$user->save();
return redirect('/');
}
$meta = json_decode($interstitial->meta);
$view = $interstitial->view;
return view($view, compact('interstitial', 'meta'));
@ -35,7 +37,7 @@ class AccountInterstitialController extends Controller
{
$this->validate($request, [
'id' => 'required',
'type' => 'required|in:post.cw,post.removed,post.unlist',
'type' => 'required|in:post.cw,post.removed,post.unlist,post.autospam',
'action' => 'required|in:appeal,confirm',
'appeal_message' => 'nullable|max:500'
]);