[ADD] AVANCE

parent 519671ff
......@@ -18,9 +18,8 @@
@RequestMapping("/gmail")
@AllArgsConstructor
public class EmailApi {
// private final Dotenv dotenv;
private final GmailService emailService;
// private final EmailMysql emailMysql;
@RequestMapping(path = "/public/generate", method = RequestMethod.POST, consumes = {MediaType.MULTIPART_FORM_DATA_VALUE})
public ResponseEntity<?> full(@ModelAttribute GmailRequest request) {
......@@ -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;
@RestController
@RequestMapping("/token")
@CrossOrigin
//@AllArgsConstructor
class JWTokenApi {
private final UserRepository userRepo = new UserRepository();
......
// package web.multitask.trismegistoservices.config;
//
// import org.springframework.context.annotation.Bean;
// import org.springframework.context.annotation.Configuration;
//
// import io.github.cdimascio.dotenv.Dotenv;
// import web.multitask.trismegistoservices.utils.DotEnvUtil;
//
// @Configuration
// public class DotEnvConfig {
//
package web.multitask.trismegistoservices.config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import io.github.cdimascio.dotenv.Dotenv;
import web.multitask.trismegistoservices.utils.DotEnvUtil;
@Configuration
public class DotEnvConfig {
// @Bean
// Dotenv getDotEnvPath() {
// return Dotenv.configure().directory(DotEnvUtil.getDotEnvPath("trismegisto-asistencia")).load();
// }
//
// }
\ No newline at end of file
Dotenv getDotEnvPath() {
return Dotenv.configure().directory(DotEnvUtil.getDotEnvPath("trismegisto-asistencia")).load();
}
}
\ No newline at end of file
......@@ -37,6 +37,7 @@ public class GoogleConfig {
private String refresh_token_drive = null;
private String client_id = null;
private String client_secret = null;
@PostConstruct
public void getGoogleCredentials() {
try {
......
package web.multitask.trismegistoservices.mysql;
import lombok.AllArgsConstructor;
import org.json.JSONObject;
import org.springframework.jdbc.core.JdbcTemplate;
......
......@@ -3,8 +3,8 @@
#spring.datasource.password=5vC0$2019$
#spring.datasource.driverClassName=com.mysql.cj.jdbc.Driver
spring.autoconfigure.exclude=org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration
server.port=8081
server.address=0.0.0.0
server.port=8082
#server.address=0.0.0.0
# spring.jpa.show-sql=true
app.jwtSecret=9a4f2c8d3b7a1e6f45c8a0b3f267d8b1d4e6f3c8a9d2b5f8e3a9c8b5f6v8a3d9
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