Conversation
145aed3 to
d7683ef
Compare
|
|
||
| if ($this->createBucket($this->publicBucketName, $style)) { | ||
| //Add DL rights for public bucket | ||
| $policyReadOnly = '{ |
There was a problem hiding this comment.
injecter la policy depuis le services.yml (en tant que parameter)
|
|
||
| use Symfony\Component\HttpFoundation\File\UploadedFile; | ||
|
|
||
| trait ProfilePicture |
There was a problem hiding this comment.
can we use a validation constraint on file? I think https://symfony.com/doc/current/reference/constraints/Image.html should be good. We may need to add a max file size value aswell
Additionnaly, We should suffix trait with Trait (we should probably prefer class composition over traits)
|
|
||
| class CreateUserDto | ||
| { | ||
| use ProfilePicture; |
There was a problem hiding this comment.
je comprend pas l'intérêt du trait alors que c'est l'unique endroit où il est utilisé. Peut être créer un trait plus générique (du style, ImageTrait) mais je ne suis pas sûr de l'utilité
| return $this->name; | ||
| } | ||
|
|
||
| public function setName(string $name): static |
There was a problem hiding this comment.
I personally dont like "fluent interface" or "return this" in most cases, I think its less readable in most cases (more than one execution per line + you can't easily know what is going on, for example $user->setName("foo")->calculateTime()->getCompany()->setName(), or worst $company->setUser($user->setName("foo"))). (weirdly the doctrine creator seems to agree with me )
We should decide on a general guideline about that
|
|
||
| export default async function useGetCompany(companyId: string) { | ||
| return useAppFetch<Company>(() => "/companies/" + companyId, { | ||
| key: "getCompany", |
There was a problem hiding this comment.
remove the key usage or use the companyId in the key
| import { GET } from "~/constants/http"; | ||
| import useAppFetch from "~/composables/useAppFetch"; | ||
|
|
||
| export default async function useListUsers() { |
|
|
||
| const route = useRoute(); | ||
|
|
||
| const { data: company, pending: companyPending } = await useGetCompany( |
| @click="onDeleteCompany(company)" | ||
| > | ||
| Delete | ||
| </button> |
|
|
||
| const onDeleteCompany = async (company: Company) => { | ||
| try { | ||
| await deleteCompany(company); |
No description provided.