Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
trismegisto-services
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Mauro Paolo Josue Zuñiga Mallqui
trismegisto-services
Commits
5c563726
Commit
5c563726
authored
Jul 15, 2024
by
Mauro Paolo Josue Zuñiga Mallqui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ADD] AVANCE
parent
519671ff
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
21 additions
and
48 deletions
+21
-48
EmailApi.java
.../java/web/multitask/trismegistoservices/api/EmailApi.java
+1
-27
JWTokenApi.java
...ava/web/multitask/trismegistoservices/api/JWTokenApi.java
+0
-1
DotEnvConfig.java
...eb/multitask/trismegistoservices/config/DotEnvConfig.java
+17
-17
GoogleConfig.java
...eb/multitask/trismegistoservices/config/GoogleConfig.java
+1
-0
RoutineSql.java
...a/web/multitask/trismegistoservices/mysql/RoutineSql.java
+0
-1
application.properties
src/main/resources/application.properties
+2
-2
No files found.
src/main/java/web/multitask/trismegistoservices/api/EmailApi.java
View file @
5c563726
...
...
@@ -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
src/main/java/web/multitask/trismegistoservices/api/JWTokenApi.java
View file @
5c563726
...
...
@@ -21,7 +21,6 @@ import org.springframework.web.bind.annotation.RequestBody;
@RestController
@RequestMapping
(
"/token"
)
@CrossOrigin
//@AllArgsConstructor
class
JWTokenApi
{
private
final
UserRepository
userRepo
=
new
UserRepository
();
...
...
src/main/java/web/multitask/trismegistoservices/config/DotEnvConfig.java
View file @
5c563726
//
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
src/main/java/web/multitask/trismegistoservices/config/GoogleConfig.java
View file @
5c563726
...
...
@@ -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
{
...
...
src/main/java/web/multitask/trismegistoservices/mysql/RoutineSql.java
View file @
5c563726
package
web
.
multitask
.
trismegistoservices
.
mysql
;
import
lombok.AllArgsConstructor
;
import
org.json.JSONObject
;
import
org.springframework.jdbc.core.JdbcTemplate
;
...
...
src/main/resources/application.properties
View file @
5c563726
...
...
@@ -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
=
808
1
server.address
=
0.0.0.0
server.port
=
808
2
#
server.address=0.0.0.0
# spring.jpa.show-sql=true
app.jwtSecret
=
9a4f2c8d3b7a1e6f45c8a0b3f267d8b1d4e6f3c8a9d2b5f8e3a9c8b5f6v8a3d9
app.jwtSecret2
=
9a4f2c8d3b7a1e6f45c8a0b3f267d8b1d4e6f3c8a9d2b5f8e3a9c8b5f6v8a3d8
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment