feat: add VCard API integration with configuration and proxy endpoints
- Implemented VCard API controller with methods to manage configuration (save, get). - Added proxy functions to handle API requests for users, vcards, memberships, payments, transactions, logs, and miniwebs. - Included error handling and response formatting for API interactions.
This commit is contained in:
+13
-2
@@ -35,12 +35,23 @@ WHERE NOT EXISTS (
|
||||
SELECT 1 FROM submodules WHERE url = '/app/cloudflare' AND deleted_at IS NULL
|
||||
);
|
||||
|
||||
-- 4. Asignar ambos submódulos a TODOS los roles (ignorar duplicados)
|
||||
-- 4. Insertar submódulo VCard API si no existe
|
||||
INSERT INTO submodules (title, description, url, module_id, modified_at, created_at, updated_at)
|
||||
SELECT 'VCard API',
|
||||
'Integración con el sistema VCard externo (Laravel + Sanctum): usuarios, membresías, vcards, pagos y más',
|
||||
'/app/vcard-api',
|
||||
(SELECT id FROM modules WHERE title = 'Integraciones' AND deleted_at IS NULL LIMIT 1),
|
||||
NOW(), NOW(), NOW()
|
||||
WHERE NOT EXISTS (
|
||||
SELECT 1 FROM submodules WHERE url = '/app/vcard-api' AND deleted_at IS NULL
|
||||
);
|
||||
|
||||
-- 5. Asignar todos los submódulos de Integraciones a TODOS los roles (ignorar duplicados)
|
||||
INSERT INTO roles_submodules (role_id, submodule_id)
|
||||
SELECT r.id, s.id
|
||||
FROM roles r
|
||||
CROSS JOIN submodules s
|
||||
WHERE s.url IN ('/app/hostinger', '/app/cloudflare')
|
||||
WHERE s.url IN ('/app/hostinger', '/app/cloudflare', '/app/vcard-api')
|
||||
AND r.deleted_at IS NULL
|
||||
AND s.deleted_at IS NULL
|
||||
ON CONFLICT DO NOTHING;
|
||||
|
||||
Reference in New Issue
Block a user