Skip to content

Commit

Permalink
Merge pull request #23 from erik1110/feature/api
Browse files Browse the repository at this point in the history
[feat] update culinary
  • Loading branch information
erik1110 committed Feb 5, 2024
2 parents 77dc907 + ae262d2 commit 837adbc
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
3 changes: 0 additions & 3 deletions src/features/culinary/culinary.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,13 @@ import {
UpdateCulinarySuccessDto,
} from './dto/culinary.dto';
import { IsObjectIdPipe } from 'nestjs-object-id';
import { AuthGuard } from '@nestjs/passport';

@ApiTags('Home/Culinary - 美味佳餚')
@ApiErrorDecorator(
HttpStatus.INTERNAL_SERVER_ERROR,
'CriticalError',
'系統錯誤,請洽系統管理員',
)
@UseGuards(AuthGuard('jwt'))
@ApiBearerAuth()
@Controller('/api/v1/home/culinary')
export class CulinaryController {
constructor(private readonly culinaryService: CulinaryService) {}
Expand Down
3 changes: 1 addition & 2 deletions src/features/culinary/culinary.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,9 @@ export class CulinaryService {

async getallCulinary(req: Request) {
const result = await this.culinaryModel.find();
const ids = result.map((order) => order._id.toString());
return getHttpResponse.successResponse({
message: '取得所有美味佳餚',
data: ids,
data: result,
});
}

Expand Down

0 comments on commit 837adbc

Please sign in to comment.