Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/apis/auth/strategies/jwt-social-kakao.strategy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export class JwtKakaoStrategy extends PassportStrategy(Strategy, 'kakao') {
clientID: process.env.KAKAO_CLIENT_ID,
clientSecret: process.env.KAKAO_CLIENT_SECRET,
callbackURL: 'https://groomeong.shop/login/kakao',
// callbackURL: 'https://localhost:3000/login/kakao',
scope: ['account_email', 'profile_nickname'],
});
}
Expand Down
12 changes: 0 additions & 12 deletions src/apis/dogs/dogs.resolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { Args, Context, Mutation, Query, Resolver } from '@nestjs/graphql';
import { CreateDogInput } from './dto/create-dog.input';
import { DogsService } from './dogs.service';
import { Dog } from './entities/dog.entity';
import { UpdateDogInput } from './dto/update-dog.input';
import { UseGuards } from '@nestjs/common';
import { GqlAuthGuard } from '../auth/guards/gql-auth.guard';
import { IContext } from 'src/commons/interface/context';
Expand Down Expand Up @@ -47,17 +46,6 @@ export class DogsResolver {
return this.dogsService.create({ createDogInput, userId });
}

@Mutation(
() => Dog,
{ description: ' Return: 업데이트한 강아지 데이터 ' }, //
)
updateDog(
@Args('id') id: string, //
@Args('updateDogInput') updateDogInput: UpdateDogInput, //
): Promise<Dog> {
return this.dogsService.updateOneById({ id, updateDogInput });
}

@Mutation(
() => Boolean,
{ description: ' Return: id로 강아지 데이터 삭제 후 삭제 여부 반환 ' }, //
Expand Down
13 changes: 0 additions & 13 deletions src/apis/dogs/dogs.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import {
IDogsServiceDeleteById,
IDogsServiceFindByUserId,
IDogsServiceFindOneById,
IDogsServiceUpdateOneById,
} from './interfaces/dogs-service.interface';
import { Repository } from 'typeorm';

Expand Down Expand Up @@ -49,18 +48,6 @@ export class DogsService {
return dog;
}

async updateOneById({
id,
updateDogInput,
}: IDogsServiceUpdateOneById): Promise<Dog> {
const founded = await this.findOneById({ id });
const updated = await this.dogsRepository.save({
...founded,
...updateDogInput,
});
return updated;
}

async deleteOneById({
id,
userId,
Expand Down
5 changes: 0 additions & 5 deletions src/apis/dogs/dto/update-dog.input.ts

This file was deleted.

6 changes: 0 additions & 6 deletions src/apis/dogs/interfaces/dogs-service.interface.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { CreateDogInput } from '../dto/create-dog.input';
import { UpdateDogInput } from '../dto/update-dog.input';

export interface IDogsServiceFindOneById {
id: string;
Expand All @@ -14,11 +13,6 @@ export interface IDogsServiceCreate {
userId: string;
}

export interface IDogsServiceUpdateOneById {
id: string;
updateDogInput: UpdateDogInput;
}

export interface IDogsServiceDeleteById {
id: string;
userId: string;
Expand Down
2 changes: 1 addition & 1 deletion src/apis/shops/entities/shop.entity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export class Shop {
@Field(() => String)
name: string;

@Column({ length: 13 })
@Column({ length: 30 })
@Field(() => String)
phone: string;

Expand Down
2 changes: 1 addition & 1 deletion src/apis/users/entities/user.entity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export class User {
// @Field(() => String)
password: string;

@Column({ length: 16 })
@Column({ length: 30 })
@Field(() => String)
phone?: string;

Expand Down