mirror of
https://github.com/Lemonochrme/service-architecture.git
synced 2025-06-08 13:40:50 +02:00
Added status for posts in init.sql
. Renamed administration section because it does not run any rest API.
This commit is contained in:
parent
292aea3d96
commit
87829a7766
7 changed files with 15 additions and 8 deletions
|
@ -3,3 +3,11 @@ VALUES
|
|||
(1, 'User'),
|
||||
(2, 'Volunteer'),
|
||||
(3, 'Admin');
|
||||
|
||||
INSERT INTO `service-architecture`.status (id, name)
|
||||
VALUES
|
||||
(1, 'Waiting'),
|
||||
(2, 'Validated'),
|
||||
(3, 'Rejected'),
|
||||
(4, 'Chosen'),
|
||||
(5, 'Finished');
|
|
@ -5,7 +5,7 @@
|
|||
<version>1.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>administration-service</artifactId>
|
||||
<artifactId>administration</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<dependencies>
|
|
@ -7,8 +7,8 @@
|
|||
<packaging>pom</packaging>
|
||||
|
||||
<modules>
|
||||
<!-- Administation-Service creates a dependency for other services -->
|
||||
<module>administration-service</module>
|
||||
<!-- Administation creates a dependency for other services -->
|
||||
<module>administration</module>
|
||||
<module>request-service</module>
|
||||
<module>role-service</module>
|
||||
<module>user-service</module>
|
||||
|
|
|
@ -1,17 +1,14 @@
|
|||
package insa.application.helpapp.rest;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
// import org.springframework.http.HttpStatus;
|
||||
// import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.servlet.config.annotation.CorsRegistry;
|
||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
||||
// import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
@SpringBootApplication
|
||||
@RestController
|
||||
|
@ -40,6 +37,8 @@ public class RequestServiceApplication {
|
|||
if(!administrationService.checkToken(idUser, token)) {
|
||||
return ResponseEntity.status(HttpStatus.FORBIDDEN).body("User or token invalid.");
|
||||
};
|
||||
return ResponseEntity.ok("yessay");
|
||||
|
||||
|
||||
return ResponseEntity.ok("Message posted");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue