mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
refactor(insights): nest CTA execution and dismissal as sub-resources
Move POST /v1/insights/:id/dismiss to /v1/insights/:id/dismissals and POST /v1/insights/:id/ctas/:ctaId/trigger to /v1/insights/:id/ctas/:ctaId/executions, with the corresponding class moves into Http/Insights/Dismissal/Create.php and Http/CTA/Execution/Create.php. Rename the response model to InsightCtaExecution and update events.php to surface dismissal and execution as resource events with create verbs. The reshape matches the rest of the API where verbs hang off plural sub-resources.
This commit is contained in:
+2
-2
@@ -92,7 +92,7 @@ use Appwrite\Utopia\Response\Model\Identity;
|
||||
use Appwrite\Utopia\Response\Model\Index;
|
||||
use Appwrite\Utopia\Response\Model\Insight;
|
||||
use Appwrite\Utopia\Response\Model\InsightCta;
|
||||
use Appwrite\Utopia\Response\Model\InsightCtaResult;
|
||||
use Appwrite\Utopia\Response\Model\InsightCtaExecution;
|
||||
use Appwrite\Utopia\Response\Model\Installation;
|
||||
use Appwrite\Utopia\Response\Model\JWT;
|
||||
use Appwrite\Utopia\Response\Model\Key;
|
||||
@@ -511,7 +511,7 @@ Response::setModel(new MigrationReport());
|
||||
Response::setModel(new MigrationFirebaseProject());
|
||||
Response::setModel(new Insight());
|
||||
Response::setModel(new InsightCta());
|
||||
Response::setModel(new InsightCtaResult());
|
||||
Response::setModel(new InsightCtaExecution());
|
||||
|
||||
// Tests (keep last)
|
||||
Response::setModel(new Mock());
|
||||
|
||||
Reference in New Issue
Block a user