Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
ARSnova Backend
Manage
Activity
Members
Labels
Plan
Issues
27
Issue boards
Milestones
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Privacy
Imprint
Contact
Snippets
Groups
Projects
Show more breadcrumbs
ARSnova
ARSnova Backend
Commits
dde371f3
Commit
dde371f3
authored
7 years ago
by
Daniel Gerhardt
Browse files
Options
Downloads
Patches
Plain Diff
Add UserController for API v3
parent
15ed6f79
Branches
Branches containing commit
1 merge request
!89
Foundation for development of version 3.0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/de/thm/arsnova/controller/UserController.java
+25
-0
25 additions, 0 deletions
src/main/java/de/thm/arsnova/controller/UserController.java
with
25 additions
and
0 deletions
src/main/java/de/thm/arsnova/controller/UserController.java
0 → 100644
+
25
−
0
View file @
dde371f3
package
de.thm.arsnova.controller
;
import
de.thm.arsnova.entities.LoginCredentials
;
import
de.thm.arsnova.entities.UserProfile
;
import
de.thm.arsnova.services.UserService
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
@RestController
@RequestMapping
(
"/user"
)
public
class
UserController
extends
AbstractEntityController
<
UserProfile
>
{
private
UserService
userService
;
public
UserController
(
final
UserService
userService
)
{
super
(
userService
);
this
.
userService
=
userService
;
}
@PostMapping
(
"/register"
)
public
void
register
(
@RequestBody
LoginCredentials
loginCredentials
)
{
userService
.
create
(
loginCredentials
.
getLoginId
(),
loginCredentials
.
getPassword
());
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment