36 lines
839 B
PHP
36 lines
839 B
PHP
<?php
|
|
|
|
namespace App\Controllers\Mangboard\Admin;
|
|
|
|
use App\Libraries\Mangboard\UserLibrary;
|
|
use App\Controllers\Admin\AdminController;
|
|
|
|
class UserController extends AdminController
|
|
{
|
|
public function __construct()
|
|
{
|
|
parent::__construct();
|
|
}
|
|
|
|
public function index(): string
|
|
{
|
|
return __METHOD__;
|
|
}
|
|
|
|
public function point(): string
|
|
{
|
|
try {
|
|
$id = $this->request->getVar("id");
|
|
$point = intval($this->request->getVar("point"));
|
|
$sign = $this->request->getVar("point") ?? "+";
|
|
|
|
$user = new UserLibrary();
|
|
$user->setPoint($id, $point, $sign);
|
|
return "완료되었습니다.";
|
|
} catch (\Exception $e) {
|
|
log_message("error", $e->getMessage());
|
|
return $e->getMessage();
|
|
}
|
|
}
|
|
}
|