Skip to content

Commit

Permalink
fix: #37 post/near body -> query로 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
ChoiYongWon committed Dec 5, 2022
1 parent b365977 commit 75bc113
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
9 changes: 0 additions & 9 deletions src/posting/dto/RequestGetPostByLocation.dto.ts

This file was deleted.

6 changes: 3 additions & 3 deletions src/posting/posting.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ import { RolesGuard } from 'src/auth/guards/roles.guard';
import { Roles } from 'src/libs/decorators/roles.decorator';
import { Role } from 'src/libs/enums/role.enum';
import { RequestDeletePostingDto } from './dto/RequestDeletePosting.dto';
import { RequestGetPostByLocationDto } from './dto/RequestGetPostByLocation.dto';
import { ResponseGetOnePostDto } from './dto/ResponseGetOnePost.dto';
import { ResponseGetPostByLocation } from './dto/ResponseGetPostByLocation.dto';
import { PostingService } from './posting.service';
Expand Down Expand Up @@ -133,12 +132,13 @@ export class PostingController {
})
@Roles([Role.User])
async getPostByLocation(
@Body() body: RequestGetPostByLocationDto,
@Query('latitude') latitude: number,
@Query('longitude') longitude: number,
@Req() req,
) {
const user_id = req.user.user_id;
return await this.postingService
.getNearPost(user_id, body.latitude, body.longitude)
.getNearPost(user_id, latitude, longitude)
.catch((err) => {
throw new HttpException(
{
Expand Down

0 comments on commit 75bc113

Please sign in to comment.