Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
arsnova-lite
Manage
Activity
Members
Labels
Plan
Issues
24
Issue boards
Milestones
Wiki
Code
Merge requests
2
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
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-lite
Commits
a45667a1
There was an error fetching the commit references. Please try again later.
Commit
a45667a1
authored
7 years ago
by
Lukas Mauß
Browse files
Options
Downloads
Patches
Plain Diff
Try to naviate into room after creating
parent
e647a279
1 merge request
!96
Resolve "comment creation api"
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/app/room-creation/room-creation.component.ts
+7
-1
7 additions, 1 deletion
src/app/room-creation/room-creation.component.ts
src/app/room.service.ts
+7
-0
7 additions, 0 deletions
src/app/room.service.ts
with
14 additions
and
1 deletion
src/app/room-creation/room-creation.component.ts
+
7
−
1
View file @
a45667a1
...
...
@@ -15,6 +15,7 @@ export class RoomCreationComponent implements OnInit {
shortName
:
string
;
emptyInputs
=
false
;
room
:
Room
;
roomId
:
string
;
constructor
(
private
roomService
:
RoomService
,
private
router
:
Router
,
...
...
@@ -41,7 +42,12 @@ export class RoomCreationComponent implements OnInit {
this
.
emptyInputs
=
true
;
return
;
}
this
.
roomService
.
addRoom
({
name
:
longRoomName
,
abbreviation
:
shortRoomName
,
description
:
description
}
as
Room
)
this
.
roomService
.
addRoom
({
name
:
longRoomName
,
abbreviation
:
shortRoomName
,
description
:
description
}
as
Room
).
subscribe
(
room
=>
this
.
room
=
room
);
this
.
roomService
.
getRoomById
(
this
.
roomId
)
.
subscribe
(
room
=>
{
this
.
room
=
room
;
this
.
notification
.
show
(
`Room '
${
this
.
room
.
name
}
' successfully created.`
);
...
...
This diff is collapsed.
Click to expand it.
src/app/room.service.ts
+
7
−
0
View file @
a45667a1
...
...
@@ -58,6 +58,13 @@ export class RoomService extends ErrorHandlingService {
);
}
getRoomById
(
id
:
string
):
Observable
<
Room
>
{
const
connectionUrl
=
`
${
this
.
apiBaseUrl
}${
this
.
roomsUrl
}
/
${
id
}
`
;
return
this
.
http
.
get
<
Room
>
(
connectionUrl
).
pipe
(
catchError
(
this
.
handleError
<
Room
>
(
`getRoom id=
${
id
}
`
))
);
}
updateRoom
(
room
:
Room
):
Observable
<
Room
>
{
const
connectionUrl
=
`
${
this
.
apiBaseUrl
}${
this
.
roomsUrl
}
/
${
room
.
id
}
`
;
return
this
.
http
.
put
(
connectionUrl
,
{
...
...
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