fix(pets): resolve pet registration flow, missing assets, 401 guard, and add none option to symptoms
Deploy Canina / deploy (push) Successful in 1m51s
Deploy Canina / deploy (push) Successful in 1m51s
This commit is contained in:
1 parent
93126c1724
commit
cc8f52cb3f
19 files changed
+115704
-115146
No files matched your search
@@ -55,36 +55,6 @@ import { PaginationDto } from '../common/dto/pagination.dto';
|
||||
export class PetsController {
|
||||
constructor(private readonly petsService: PetsService) {}
|
||||
|
||||
@Post()
|
||||
@ApiOperation({ summary: 'ثبت حیوان خانگی جدید' })
|
||||
@ApiCreatedResponse({
|
||||
description: 'حیوان خانگی جدید با موفقیت ثبت شد',
|
||||
schema: {
|
||||
example: {
|
||||
id: 'c7b8d9e0-1234-5678-abcd-ef1234567890',
|
||||
userId: 'd8c4e428-cd2f-4c55-bfa3-dfa312bb6480',
|
||||
name: 'بادی',
|
||||
type: 'سگ',
|
||||
breed: 'ژرمن شپرد',
|
||||
age: 3,
|
||||
weight: '25.50',
|
||||
activityLevel: 'متوسط',
|
||||
imageUrl: null,
|
||||
createdAt: '2026-05-26T18:10:00.000Z',
|
||||
},
|
||||
},
|
||||
})
|
||||
@ApiBadRequestResponse({
|
||||
description: 'خطا در صحتسنجی فیلدهای ورودی',
|
||||
schema: {
|
||||
example: {
|
||||
success: false,
|
||||
message: 'نوع حیوان خانگی اجباری است',
|
||||
code: 'BAD_REQUEST',
|
||||
details: {},
|
||||
},
|
||||
},
|
||||
})
|
||||
@Post('upload-image')
|
||||
@UseInterceptors(
|
||||
FileInterceptor('file', {
|
||||
@@ -116,6 +86,36 @@ export class PetsController {
|
||||
return { url, filename: file.filename };
|
||||
}
|
||||
|
||||
@Post()
|
||||
@ApiOperation({ summary: 'ثبت حیوان خانگی جدید' })
|
||||
@ApiCreatedResponse({
|
||||
description: 'حیوان خانگی جدید با موفقیت ثبت شد',
|
||||
schema: {
|
||||
example: {
|
||||
id: 'c7b8d9e0-1234-5678-abcd-ef1234567890',
|
||||
userId: 'd8c4e428-cd2f-4c55-bfa3-dfa312bb6480',
|
||||
name: 'بادی',
|
||||
type: 'سگ',
|
||||
breed: 'ژرمن شپرد',
|
||||
age: 3,
|
||||
weight: '25.50',
|
||||
activityLevel: 'متوسط',
|
||||
imageUrl: null,
|
||||
createdAt: '2026-05-26T18:10:00.000Z',
|
||||
},
|
||||
},
|
||||
})
|
||||
@ApiBadRequestResponse({
|
||||
description: 'خطا در صحتسنجی فیلدهای ورودی',
|
||||
schema: {
|
||||
example: {
|
||||
success: false,
|
||||
message: 'نوع حیوان خانگی اجباری است',
|
||||
code: 'BAD_REQUEST',
|
||||
details: {},
|
||||
},
|
||||
},
|
||||
})
|
||||
create(
|
||||
@Req() req: { user: { id: string } },
|
||||
@Body() createPetDto: CreatePetDto,
|
||||
|
||||
Reference in new issue
Block a user