Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
ARSnova Backend
Manage
Activity
Members
Labels
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Operate
Environments
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
Paul-Christian Volkmer
ARSnova Backend
Commits
7b7a43f2
Commit
7b7a43f2
authored
12 years ago
by
Paul-Christian Volkmer
Browse files
Options
Downloads
Patches
Plain Diff
Remove unused members
parent
02ab4022
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/main/java/de/thm/arsnova/services/QuestionService.java
+3
-9
3 additions, 9 deletions
src/main/java/de/thm/arsnova/services/QuestionService.java
src/main/java/de/thm/arsnova/services/UserService.java
+2
-1
2 additions, 1 deletion
src/main/java/de/thm/arsnova/services/UserService.java
with
5 additions
and
10 deletions
src/main/java/de/thm/arsnova/services/QuestionService.java
+
3
−
9
View file @
7b7a43f2
...
@@ -30,19 +30,12 @@ import de.thm.arsnova.entities.Answer;
...
@@ -30,19 +30,12 @@ import de.thm.arsnova.entities.Answer;
import
de.thm.arsnova.entities.Question
;
import
de.thm.arsnova.entities.Question
;
import
de.thm.arsnova.entities.Session
;
import
de.thm.arsnova.entities.Session
;
import
de.thm.arsnova.exceptions.NoContentException
;
import
de.thm.arsnova.exceptions.NoContentException
;
import
de.thm.arsnova.socket.ARSnovaSocketIOServer
;
@Service
@Service
public
class
QuestionService
implements
IQuestionService
{
public
class
QuestionService
implements
IQuestionService
{
@Autowired
@Autowired
ARSnovaSocketIOServer
server
;
private
IDatabaseDao
databaseDao
;
@Autowired
IDatabaseDao
databaseDao
;
@Autowired
IUserService
userService
;
public
void
setDatabaseDao
(
IDatabaseDao
databaseDao
)
{
public
void
setDatabaseDao
(
IDatabaseDao
databaseDao
)
{
this
.
databaseDao
=
databaseDao
;
this
.
databaseDao
=
databaseDao
;
...
@@ -52,8 +45,9 @@ public class QuestionService implements IQuestionService {
...
@@ -52,8 +45,9 @@ public class QuestionService implements IQuestionService {
@Authenticated
@Authenticated
public
List
<
Question
>
getSkillQuestions
(
String
sessionkey
)
{
public
List
<
Question
>
getSkillQuestions
(
String
sessionkey
)
{
List
<
Question
>
result
=
databaseDao
.
getSkillQuestions
(
sessionkey
);
List
<
Question
>
result
=
databaseDao
.
getSkillQuestions
(
sessionkey
);
if
(
result
==
null
||
result
.
size
()
==
0
)
if
(
result
==
null
||
result
.
size
()
==
0
)
{
throw
new
NoContentException
();
throw
new
NoContentException
();
}
return
result
;
return
result
;
}
}
...
...
This diff is collapsed.
Click to expand it.
src/main/java/de/thm/arsnova/services/UserService.java
+
2
−
1
View file @
7b7a43f2
...
@@ -75,8 +75,9 @@ public class UserService implements IUserService, InitializingBean, DisposableBe
...
@@ -75,8 +75,9 @@ public class UserService implements IUserService, InitializingBean, DisposableBe
user
=
new
User
(
token
);
user
=
new
User
(
token
);
}
}
if
(
user
==
null
||
user
.
getUsername
().
equals
(
"anonymous"
))
if
(
user
==
null
||
user
.
getUsername
().
equals
(
"anonymous"
))
{
throw
new
UnauthorizedException
();
throw
new
UnauthorizedException
();
}
return
user
;
return
user
;
}
}
...
...
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