Finish API ?

This commit is contained in:
2026-01-30 11:03:44 +01:00
parent b49424b6ee
commit 2c3923f03b
15 changed files with 318 additions and 17 deletions

View File

@@ -2,6 +2,7 @@
namespace RomhackPlazaFS\Endpoints;
use RomhackPlazaFS\Library\Data;
use RomhackPlazaFS\Library\Log;
use RomhackPlazaFS\RomhackPlazaFS;
defined( 'ROMHACKPLAZA_FS' ) || exit;
@@ -14,12 +15,12 @@ class Markasprivate extends Abstract_Endpoint {
protected function private_endpoint(): bool
{
return false;
return true;
}
protected function require_token(): bool
{
return false;
return true;
}
protected function get_post_params(): void {
@@ -59,6 +60,8 @@ class Markasprivate extends Abstract_Endpoint {
if( $new_data->file_exists() )
RomhackPlazaFS::fatal_stop( 500, "File already exists. Can't replace. Please delete private file before." );
new Log( __class__, "WP Id=" . $this->token_info['user_id'] ,$this->file_name, $this->post_id, $this->custom_post_type );
if( $data->change_data_location( $new_data ) )
RomhackPlazaFS::success_response( [ 'status' => Data::STATUS_PRIVATE ] );