mirror of
https://github.com/WerySkok/nativegallery.git
synced 2024-12-23 00:50:58 +03:00
23 lines
474 B
PHP
23 lines
474 B
PHP
<?php
|
|
|
|
namespace App\Controllers\Api\Admin;
|
|
|
|
|
|
|
|
use App\Services\{Auth, Router, GenerateRandomStr, DB, Json, EXIF};
|
|
use App\Models\{User, Vote, Photo};
|
|
|
|
|
|
class CreateNews
|
|
{
|
|
public function __construct()
|
|
{
|
|
DB::query('INSERT INTO news VALUES (\'0\', :body, :time)', array(':body' => $_POST['body'], ':time' => time()));
|
|
echo json_encode(
|
|
array(
|
|
'errorcode' => 0,
|
|
'error' => 0
|
|
)
|
|
);
|
|
}
|
|
}
|