Skip to content

Commit

Permalink
Merge pull request #3 from commudle/feature-user-profile
Browse files Browse the repository at this point in the history
update fork
  • Loading branch information
harshita2216 authored Apr 15, 2021
2 parents 6594005 + ac0d59e commit ef02f1d
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
17 changes: 17 additions & 0 deletions projects/commudle-admin/src/app/services/discussions.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,23 @@ export class DiscussionsService {
);
}

pGetOrCreateForSpeakerResourceChat(speakerResourceId): Observable<IDiscussion> {
const params = new HttpParams().set('speaker_resource_id', speakerResourceId);
return this.http.get<IDiscussion>(
this.apiRoutesService.getRoute(API_ROUTES.DISCUSSIONS.PUBLIC_GET_OR_CREATE_FOR_SPEAKER_RESOURCE_CHAT),
{ params }
);
}


pGetOrCreateForFeedItemChat(feedItemId): Observable<IDiscussion> {
const params = new HttpParams().set('feed_item_id', feedItemId);
return this.http.get<IDiscussion>(
this.apiRoutesService.getRoute(API_ROUTES.DISCUSSIONS.PUBLIC_GET_OR_CREATE_FOR_FEED_ITEM_CHAT),
{ params }
);
}


pGetOrCreateForCommunityChannel(communityChannelId): Observable<IDiscussion> {
const params = new HttpParams().set('community_channel_id', communityChannelId);
Expand Down
2 changes: 2 additions & 0 deletions projects/shared-services/api-routes.constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,8 @@ export const API_ROUTES = {
PUBLIC_GET_OR_CREATE_FOR_EVENT_CHAT: 'api/v2/discussions/public_get_or_create_for_event_chat',
PUBLIC_GET_OR_CREATE_FOR_COMMUNITY_BUILD_CHAT: 'api/v2/discussions/public_get_or_create_for_community_build_chat',
PUBLIC_GET_OR_CREATE_FOR_LAB_CHAT: 'api/v2/discussions/public_get_or_create_for_lab_chat',
PUBLIC_GET_OR_CREATE_FOR_SPEAKER_RESOURCE_CHAT: 'api/v2/discussions/public_get_or_create_for_speaker_resource_chat',
PUBLIC_GET_OR_CREATE_FOR_FEED_ITEM_CHAT: 'api/v2/discussions/public_get_or_create_for_feed_item_chat',
PUBLIC_GET_OR_CREATE_FOR_COMMUNITY_CHANNEL_CHAT: 'api/v2/discussions/public_get_or_create_for_community_channel_chat',
COMMUNITY_CHANNEL: {
NEW_ATTACHMENT_MESSAGE: 'api/v2/discussions/community_channel/new_attachment_message',
Expand Down

0 comments on commit ef02f1d

Please sign in to comment.