<?php


namespace Heanup\App\Api\Controller\User;


use Heanup\App\Api\RestfulController;

class Auth extends RestfulController
{

    /**
     * Get Method|获取数据
     * @return void
     */
    protected function getData()
    {
        $cookie = $_SESSION['user_key'];
        if (!$cookie) {
            $cookie = md5(time());
            $_SESSION['user_key'] = $cookie;
        }
        $this->showSuccess($cookie);
    }

    /**
     * Post Method|新增数据
     * @return void
     */
    protected function postData()
    {
        // TODO: 需要实现 postData() 方法.
    }

    /**
     * Put Method|更新数据
     * @return void
     */
    protected function putData()
    {
        // TODO: 需要实现 putData() 方法.
    }

    /**
     * Delete Method|删除数据
     * @return void
     */
    protected function deleteData()
    {
        // TODO: 需要实现 deleteData() 方法.
    }
}