<?php

namespace App\Http\Controllers\Deed;

use App\Http\Controllers\Core\Auth;
use App\Services\Deed\NoticeService;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;

class NoticeController extends Controller
{
    //

    public function readNotice()
    {
        $uid = Auth::auth();
        $notice = new NoticeService();
        $notice->readNotice($uid);
        return response()->json([
            'code' => 200,
            'message' => 'OK'
        ]);
    }

    public function subscribe()
    {
        $uid = Auth::auth();
        $ns = new NoticeService();
        $ns->subscribe($uid);
        return array(
            'code' => 200,
            'message' => 'success'
        );
    }
}
