Skip to content

Commit df49bbf

Browse files
committed
Http status added
1 parent ed82252 commit df49bbf

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/main/java/git/tracehub/pmo/controller/ProjectController.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,14 @@
2727
import java.util.UUID;
2828
import lombok.RequiredArgsConstructor;
2929
import org.springframework.beans.factory.annotation.Value;
30+
import org.springframework.http.HttpStatus;
3031
import org.springframework.security.core.annotation.AuthenticationPrincipal;
3132
import org.springframework.security.oauth2.jwt.Jwt;
3233
import org.springframework.web.bind.annotation.GetMapping;
3334
import org.springframework.web.bind.annotation.PathVariable;
3435
import org.springframework.web.bind.annotation.PostMapping;
3536
import org.springframework.web.bind.annotation.RequestBody;
37+
import org.springframework.web.bind.annotation.ResponseStatus;
3638
import org.springframework.web.bind.annotation.RestController;
3739

3840
/**
@@ -102,6 +104,7 @@ public Project byId(@PathVariable final UUID id) {
102104
* if project is public, every one can create it;
103105
* otherwise we need to request a payment from the user.
104106
*/
107+
@ResponseStatus(HttpStatus.CREATED)
105108
public Project employ(
106109
@RequestBody final Project project,
107110
@AuthenticationPrincipal final Jwt jwt

0 commit comments

Comments
 (0)