feat: scraping endpoints, job persistence, firsts unit tests, legacy entities usage

This commit is contained in:
ext.jeremy.guillot@maxicoffee.domains
2025-02-07 11:56:51 +01:00
parent c55cd62ec7
commit 0374ab0e46
34 changed files with 348 additions and 326 deletions

View File

@@ -22,21 +22,21 @@ use Symfony\Component\Validator\Constraints as Assert;
#[ORM\Entity(repositoryClass: UserRepository::class)]
#[ORM\Table(name: '`user`')]
#[ApiResource(
operations: [
new Get(),
new GetCollection(),
new Post(
validationContext: ['groups' => ['Default', 'postValidation']]
),
new Put(),
new Patch(),
new Delete()
],
normalizationContext: ['groups' => ['user:read']],
denormalizationContext: ['groups' => ['user:write']],
security: "is_granted('ROLE_USER')"
)]
// #[ApiResource(
// operations: [
// new Get(),
// new GetCollection(),
// new Post(
// validationContext: ['groups' => ['Default', 'postValidation']]
// ),
// new Put(),
// new Patch(),
// new Delete()
// ],
// normalizationContext: ['groups' => ['user:read']],
// denormalizationContext: ['groups' => ['user:write']],
// security: "is_granted('ROLE_USER')"
// )]
#[UniqueEntity(fields: ['email'], message: 'There is already an account with this email')]
class User implements UserInterface, PasswordAuthenticatedUserInterface
{