Skip to content

Commit

Permalink
Image upload logic implemented but doesn't have been tested.
Browse files Browse the repository at this point in the history
Persistent CORS problems.
  • Loading branch information
cvazquezlos committed Apr 15, 2017
1 parent 534e9ad commit 5bde9c1
Show file tree
Hide file tree
Showing 37 changed files with 28 additions and 3,773 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.security.core.Authentication;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
Expand Down Expand Up @@ -42,6 +43,7 @@ public interface UserDetail extends User.Basic, User.Act, User.Fin, Fine.Basic,
@Autowired
private LogicService logicService;

@CrossOrigin(origins = "http://localhost:4200")
@JsonView(UserDetail.class)
@RequestMapping(value = "", method = RequestMethod.POST)
public ResponseEntity<User> postUser(@RequestBody User user) {
Expand Down Expand Up @@ -85,6 +87,7 @@ public ResponseEntity<User> getUser(@PathVariable int id, Authentication authent
}
}

@CrossOrigin(origins = "http://localhost:4200")
@JsonView(UserDetail.class)
@RequestMapping(value = "/{id}", method = RequestMethod.DELETE)
public ResponseEntity<User> deleteUser(@PathVariable Integer id, HttpSession session,
Expand All @@ -109,6 +112,7 @@ public ResponseEntity<User> deleteUser(@PathVariable Integer id, HttpSession ses
}
}

@CrossOrigin(origins = "http://localhost:4200")
@JsonView(UserDetail.class)
@RequestMapping(value = "/{id}", method = RequestMethod.PUT)
public ResponseEntity<User> putUser(@PathVariable Integer id, @RequestBody User userUpdated,
Expand Down Expand Up @@ -140,6 +144,7 @@ public ResponseEntity<User> putUser(@PathVariable Integer id, @RequestBody User
}
}

@CrossOrigin(origins = "http://localhost:4200")
@JsonView(UserDetail.class)
@RequestMapping(value = "/{id}/upload", method = RequestMethod.PUT)
public ResponseEntity<User> putUserImage(@PathVariable Integer id,
Expand Down
Binary file modified backend/target/appSpring-0.0.1.jar
Binary file not shown.
Binary file modified backend/target/appSpring-0.0.1.jar.original
Binary file not shown.
11 changes: 0 additions & 11 deletions backend/target/classes/META-INF/MANIFEST.MF

This file was deleted.

This file was deleted.

23 changes: 0 additions & 23 deletions backend/target/classes/application.properties

This file was deleted.

Binary file removed backend/target/classes/keystore.jks
Binary file not shown.
46 changes: 0 additions & 46 deletions backend/target/classes/templates/about.html

This file was deleted.

Loading

0 comments on commit 5bde9c1

Please sign in to comment.