Skip to content

Commit

Permalink
Refactor: 필요없는 콘솔로그 제거
Browse files Browse the repository at this point in the history
  • Loading branch information
soulchicken committed Oct 25, 2023
1 parent b7565ed commit b7d4347
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 12 deletions.
10 changes: 0 additions & 10 deletions src/pages/api/auth/[...nextauth].ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@ export const authOptions: NextAuthOptions = {
provider: 'credential',
});

console.log('authorize', data);

if (data.nickname && data.accessToken) {
const user = {
accessToken: data.accessToken,
Expand Down Expand Up @@ -78,17 +76,13 @@ export const authOptions: NextAuthOptions = {
callbacks: {
async signIn({ user, account }) {
if (account?.type === 'credentials') return true;
console.log('user', user);
console.log('account', account);
const data = await socialLoginAPI({
email: user.email || '',
name: user.name || '',
provider: account?.provider || '',
password: null,
});

console.log('data', data);

if (data?.accessToken && data?.refreshToken) {
user.accessToken = data.accessToken;
user.refreshToken = data.refreshToken;
Expand All @@ -111,8 +105,6 @@ export const authOptions: NextAuthOptions = {
// 만료된 경우 refreshToken으로 새 accessToken을 발급
const newToken = await refreshAccessToken(token.refreshToken as string);

console.log('newAccessToken -- jwt', newToken);

if (newToken) {
token.accessToken = newToken.accessToken; // 새로운 accessToken으로 업데이트
token.refreshToken = newToken.refreshToken; // 새로운 accessToken으로 업데이트
Expand All @@ -133,8 +125,6 @@ export const authOptions: NextAuthOptions = {
},

async redirect({ url, baseUrl }) {
console.log('Redirect URL:', url);
console.log('Base URL:', baseUrl);
if (url.startsWith('/')) {
return `${baseUrl}${url}`;
} if (new URL(url).origin === baseUrl) {
Expand Down
1 change: 0 additions & 1 deletion src/pages/community/[character_id]/[post_id]/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ const Post = () => {
if (typeof characterId === 'string' && typeof postId === 'string') {
findPostById(characterId, postId).then((data) => {
setPost(data);
console.log(data);
}).catch((error) => {
console.error('Error fetching post:', error);
});
Expand Down
1 change: 0 additions & 1 deletion src/utils/api/character.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,5 @@ export const findAllCharacters = async () => {

export const findCharacterById = async (characterId: string) => {
const result = await webServerInstance.get(`/characters/${characterId}`);
console.log(`find By Id characters : ${result.data}`);
return result.data;
};

0 comments on commit b7d4347

Please sign in to comment.