feat : coupon
This commit is contained in:
@@ -5,6 +5,7 @@ declare(strict_types=1);
|
||||
namespace App\Controller\Api;
|
||||
|
||||
use App\Controller\AbstractController;
|
||||
use App\Service\Api\Coupon\CouponListService;
|
||||
use App\Service\Api\Coupon\HomePopupsService;
|
||||
use Hyperf\HttpServer\Annotation\Controller;
|
||||
use Hyperf\HttpServer\Annotation\RequestMapping;
|
||||
@@ -13,10 +14,23 @@ use Hyperf\Validation\Annotation\Scene;
|
||||
#[Controller(prefix: 'api/coupon')]
|
||||
class CouponController extends AbstractController
|
||||
{
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
#[RequestMapping(path: "home_popups", methods: "GET")]
|
||||
#[Scene(scene: "home_popups")]
|
||||
public function homePopups()
|
||||
{
|
||||
return (new HomePopupsService)->handle();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
#[RequestMapping(path: "my_coupon", methods: "GET")]
|
||||
#[Scene(scene: "my_coupon")]
|
||||
public function myCoupon()
|
||||
{
|
||||
return (new CouponListService)->handle();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user