瀏覽代碼

Update AccountInterstitialController, add autospam type

Daniel Supernault 4 年之前
父節點
當前提交
c67f0c5784
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      app/Http/Controllers/AccountInterstitialController.php

+ 3 - 1
app/Http/Controllers/AccountInterstitialController.php

@@ -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'
         ]);