Skip to content

Commit

Permalink
Merge pull request #107 from Hoang-Nguyen-Huy/feat/socket
Browse files Browse the repository at this point in the history
Feat/socket
  • Loading branch information
nguyenhcp2004 authored Oct 24, 2024
2 parents 10416c4 + ce1310e commit 6dda2c9
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,15 +106,18 @@ ApiResponse<AccountResponseClient> getMe(@RequestHeader("Authorization") String
}

@PostMapping("/send-email")
public String sendEmail(@RequestBody SendMailRequest request) throws MessagingException, IOException {
ApiResponse sendEmail(@RequestBody SendMailRequest request) throws MessagingException, IOException {
sendEmailService.sendCalenderInvite(
CalendarRequest.builder()
.subject("Đăt lịch ở POD Booking")
.description("Hãy đặt lịch ở calendar để không bị bỏ lỡ")
.summary("Đăt lịch ở POD Booking")
.to(request.getEmail())
.eventDateTime(LocalDateTime.parse("2024-10-27T17:00:00")).build());
return "Send email successfully";
.eventDateTime(LocalDateTime.parse(request.getStartTime())).build());
return ApiResponse.builder()
.message("Gửi lời mời đặt lịch thành công")
.code(200)
.build();
}

@GetMapping("/staff")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
package com.swp.PodBookingSystem.dto.request.Account;

import com.swp.PodBookingSystem.enums.AccountRole;
import jakarta.persistence.EnumType;
import jakarta.persistence.Enumerated;
import jakarta.persistence.*;
import lombok.*;
import lombok.experimental.FieldDefaults;

Expand All @@ -12,6 +11,8 @@
@Builder
@FieldDefaults(level = AccessLevel.PRIVATE)
public class AccountResponseClient {
@Id
String id;
String name;
String email;
String avatar;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@
@FieldDefaults(level = AccessLevel.PRIVATE)
public class SendMailRequest {
String email;
String startTime;
}

0 comments on commit 6dda2c9

Please sign in to comment.