[ADD] AVANCE

parent 519671ff
...@@ -18,9 +18,8 @@ ...@@ -18,9 +18,8 @@
@RequestMapping("/gmail") @RequestMapping("/gmail")
@AllArgsConstructor @AllArgsConstructor
public class EmailApi { public class EmailApi {
// private final Dotenv dotenv;
private final GmailService emailService; private final GmailService emailService;
// private final EmailMysql emailMysql;
@RequestMapping(path = "/public/generate", method = RequestMethod.POST, consumes = {MediaType.MULTIPART_FORM_DATA_VALUE}) @RequestMapping(path = "/public/generate", method = RequestMethod.POST, consumes = {MediaType.MULTIPART_FORM_DATA_VALUE})
public ResponseEntity<?> full(@ModelAttribute GmailRequest request) { public ResponseEntity<?> full(@ModelAttribute GmailRequest request) {
...@@ -33,28 +32,4 @@ ...@@ -33,28 +32,4 @@
} }
} }
// @RequestMapping(path = "/service/confirmation", method = RequestMethod.POST, consumes = {MediaType.MULTIPART_FORM_DATA_VALUE})
// public ResponseEntity<?> template(@ModelAttribute GmailRequest request) {
// try {
// String URL = dotenv.get("URL_CONFIRMATION");
// assert URL != null;
// JSONObject extra = request.getExtra();
// JSONObject response = emailMysql.getHTMLTemplate(extra);
// if(response.getBoolean("status")){
// JSONObject data = response.getJSONArray("data").getJSONObject(0);
// String html = data.getString("html");
// html = html.replaceAll("TOKEN", extra.getString("token"));
// html = html.replaceAll("URL", URL);
// request.setBody(html);
// MimeMessage message = emailService.htmlMessage(request);
// JSONObject responseEmail = emailService.send(message);
// return ResponseEntity.ok(responseEmail.toMap());
// }else{
// return ResponseEntity.internalServerError().body(new JSONObject().put("message", response.getString("message")).put("status", false).toMap());
// }
// } catch (Exception e) {
// return ResponseEntity.internalServerError().body(new JSONObject().put("message", e.getMessage()).put("status", false).toMap());
// }
// }
} }
\ No newline at end of file
...@@ -21,7 +21,6 @@ import org.springframework.web.bind.annotation.RequestBody; ...@@ -21,7 +21,6 @@ import org.springframework.web.bind.annotation.RequestBody;
@RestController @RestController
@RequestMapping("/token") @RequestMapping("/token")
@CrossOrigin @CrossOrigin
//@AllArgsConstructor
class JWTokenApi { class JWTokenApi {
private final UserRepository userRepo = new UserRepository(); private final UserRepository userRepo = new UserRepository();
......
// package web.multitask.trismegistoservices.config; package web.multitask.trismegistoservices.config;
//
// import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
// import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
//
// import io.github.cdimascio.dotenv.Dotenv; import io.github.cdimascio.dotenv.Dotenv;
// import web.multitask.trismegistoservices.utils.DotEnvUtil; import web.multitask.trismegistoservices.utils.DotEnvUtil;
//
// @Configuration @Configuration
// public class DotEnvConfig { public class DotEnvConfig {
//
// @Bean // @Bean
// Dotenv getDotEnvPath() { Dotenv getDotEnvPath() {
// return Dotenv.configure().directory(DotEnvUtil.getDotEnvPath("trismegisto-asistencia")).load(); return Dotenv.configure().directory(DotEnvUtil.getDotEnvPath("trismegisto-asistencia")).load();
// } }
//
// } }
\ No newline at end of file \ No newline at end of file
...@@ -37,6 +37,7 @@ public class GoogleConfig { ...@@ -37,6 +37,7 @@ public class GoogleConfig {
private String refresh_token_drive = null; private String refresh_token_drive = null;
private String client_id = null; private String client_id = null;
private String client_secret = null; private String client_secret = null;
@PostConstruct @PostConstruct
public void getGoogleCredentials() { public void getGoogleCredentials() {
try { try {
......
package web.multitask.trismegistoservices.mysql; package web.multitask.trismegistoservices.mysql;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import org.json.JSONObject; import org.json.JSONObject;
import org.springframework.jdbc.core.JdbcTemplate; import org.springframework.jdbc.core.JdbcTemplate;
......
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
#spring.datasource.password=5vC0$2019$ #spring.datasource.password=5vC0$2019$
#spring.datasource.driverClassName=com.mysql.cj.jdbc.Driver #spring.datasource.driverClassName=com.mysql.cj.jdbc.Driver
spring.autoconfigure.exclude=org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration spring.autoconfigure.exclude=org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration
server.port=8081 server.port=8082
server.address=0.0.0.0 #server.address=0.0.0.0
# spring.jpa.show-sql=true # spring.jpa.show-sql=true
app.jwtSecret=9a4f2c8d3b7a1e6f45c8a0b3f267d8b1d4e6f3c8a9d2b5f8e3a9c8b5f6v8a3d9 app.jwtSecret=9a4f2c8d3b7a1e6f45c8a0b3f267d8b1d4e6f3c8a9d2b5f8e3a9c8b5f6v8a3d9
app.jwtSecret2=9a4f2c8d3b7a1e6f45c8a0b3f267d8b1d4e6f3c8a9d2b5f8e3a9c8b5f6v8a3d8 app.jwtSecret2=9a4f2c8d3b7a1e6f45c8a0b3f267d8b1d4e6f3c8a9d2b5f8e3a9c8b5f6v8a3d8
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment