mirror of
https://github.com/claradex/nativegallery.git
synced 2024-11-15 19:49:08 +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
|
|
)
|
|
);
|
|
}
|
|
}
|