Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
frag.jetzt SWTP 2022
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
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
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Marc Tröll
frag.jetzt SWTP 2022
Commits
60853c4b
Verified
Commit
60853c4b
authored
7 years ago
by
Lukas Mauß
Committed by
Lukas Maximilian Kimpel
7 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Add addToHistory method which sends user data and current date to api
parent
b8b81029
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/app/room.service.ts
+7
-0
7 additions, 0 deletions
src/app/room.service.ts
with
7 additions
and
0 deletions
src/app/room.service.ts
+
7
−
0
View file @
60853c4b
...
...
@@ -14,7 +14,9 @@ const httpOptions = {
export
class
RoomService
extends
ErrorHandlingService
{
private
apiBaseUrl
=
'
https://arsnova-staging.mni.thm.de/api
'
;
private
roomsUrl
=
'
/room
'
;
private
userUrl
=
'
/user
'
;
private
findRoomsUrl
=
'
/find
'
;
private
joinDate
=
new
Date
(
Date
.
now
());
constructor
(
private
http
:
HttpClient
,
private
authService
:
AuthenticationService
)
{
...
...
@@ -58,6 +60,11 @@ export class RoomService extends ErrorHandlingService {
);
}
addToHistory
(
roomId
:
string
):
void
{
const
connectionUrl
=
`
${
this
.
apiBaseUrl
}${
this
.
userUrl
}
/
${
this
.
authService
.
getUser
().
userId
}
/roomHistory`
;
this
.
http
.
post
(
connectionUrl
,
{
roomId
:
roomId
,
lastVisit
:
this
.
joinDate
.
getTime
()
},
httpOptions
).
subscribe
(
r
=>
console
.
log
(
r
));
}
getRoomById
(
id
:
string
):
Observable
<
Room
>
{
const
connectionUrl
=
`
${
this
.
apiBaseUrl
}${
this
.
roomsUrl
}
/
${
id
}
`
;
return
this
.
http
.
get
<
Room
>
(
connectionUrl
).
pipe
(
...
...
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