Skip to content

로그인 필요한 페이지에서 로그인 안내 문구 #32

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Feb 23, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
fix: change email template css
  • Loading branch information
winverse committed Feb 22, 2024
commit 77e5d16a2a7c96108569d66359351de294ebfa34
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ const userResolvers: Resolvers = {
checkEmailExists: async (_, { input }) => {
const userService = container.resolve(UserService)
const user = await userService.findByEmail(input.email)
console.log('user', user)
return !!user
},
},
Expand Down
12 changes: 6 additions & 6 deletions packages/velog-server/src/services/UserService/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -242,13 +242,13 @@ export class UserService implements Service {
try {
if (ENV.dockerEnv === 'development') {
console.log(`Login URL: ${ENV.clientV3Host}/email-change?code=${code}`)
} else {
await this.mail.sendMail({
to: email,
from: '[email protected]',
...template,
})
}

await this.mail.sendMail({
to: email,
from: '[email protected]',
...template,
})
} catch (error) {
console.error('change email error', error)
throw error
Expand Down
7 changes: 4 additions & 3 deletions packages/velog-server/src/template/changeEmailTemplate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ export const changeEmailTemplate: ChangeEmailTemplateArgs = (username, email, co
<a href="https://velog.io">
<img src="https://images.velog.io/email-logo.png" style="display: block; width: 128px; margin: 0 auto;"/>
</a>
<div style="max-width: 100%; width: 400px; margin: 0 auto; padding: 1rem; text-align: justify; background: #f8f9fa; border: 1px solid #dee2e6; box-sizing: border-box; border-radius: 4px; color: #868e96; margin-top: 0.5rem; box-sizing: border-box;">
<b style="black">안녕하세요!</b>
${username}의 이메일을 ${email}로 ${text}하는 것을 승인하겠습니까?
<div style="max-width: 100%; margin: 0 auto; padding: 1rem; text-align: justify; background: #f8f9fa; border: 1px solid #dee2e6; box-sizing: border-box; border-radius: 4px; color: #868e96; margin-top: 0.5rem; box-sizing: border-box;">
<div><b style="black">안녕하세요!</b></div>
<p style="white-space: pre; word-wrap: break-word; word-break: break-all;">${username}의 이메일을 ${email}로 ${text}하는 것을 승인하겠습니까?</p>
</div>
<a href="${endpoint}/email-change?code=${code}" style="text-decoration: none; width: 400px; text-align:center; display:block; margin: 0 auto; margin-top: 1rem; background: #845ef7; padding-top: 1rem; color: white; font-size: 1.25rem; padding-bottom: 1rem; font-weight: 600; border-radius: 4px;">
${text}하기
Expand All @@ -25,6 +25,7 @@ export const changeEmailTemplate: ChangeEmailTemplateArgs = (username, email, co
</div>
</div>
`

return {
subject,
body,
Expand Down