<?php
declare(strict_types=1);
namespace App\Controller\Home;
use App\Controller\BaseController;
use Hyperf\HttpServer\Annotation\Controller;
use Hyperf\HttpServer\Annotation\Middleware;
use Hyperf\HttpServer\Annotation\PostMapping;
use App\Middleware\OssCallbackMiddleware;
class NotifyController extends BaseController
{
public function ossCallback()
{
$body = $this->request->getBody();
if($body){
$content = $body->getContents();
parse_str($content, $inputData);
$ret = $this->attachmentRepository->saveAttachment($inputData);
return $this->success($ret);
}else{
$data = ["state" => "fail"];
return $this->error($data);
}
}
}