From d9d9e5b1a6cfd283e32c697d2a878d02e26d7bae Mon Sep 17 00:00:00 2001 From: Daniel Date: Wed, 22 Apr 2026 09:52:20 +0200 Subject: [PATCH] refactor: update products endpoint to use to_dict method for consistency --- tienda/api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tienda/api.py b/tienda/api.py index 03155af..27f43dc 100644 --- a/tienda/api.py +++ b/tienda/api.py @@ -9,4 +9,4 @@ def hola(request): @api.get("/products") def products(request): productos = Product.objects.all() - return [dict(producto) for producto in productos] \ No newline at end of file + return [producto.to_dict() for producto in productos] \ No newline at end of file