src/app/modules/discussion/services/discussion/discussion.service.ts
Properties |
Methods |
constructor(csLibInitializerService: CsLibInitializerService, formService: FormService)
|
|||||||||
Parameters :
|
attachForum | ||||
attachForum(data)
|
||||
Parameters :
Returns :
any
|
createForum | ||||
createForum(data)
|
||||
Parameters :
Returns :
any
|
fetchForumConfig | ||||
fetchForumConfig(contentType)
|
||||
Parameters :
Returns :
any
|
getForumIds | ||||
getForumIds(data)
|
||||
Parameters :
Returns :
any
|
getUserDetails | ||||
getUserDetails(userId)
|
||||
Parameters :
Returns :
any
|
registerUser | ||||
registerUser(data)
|
||||
Parameters :
Returns :
any
|
removeForum | ||||
removeForum(data)
|
||||
Parameters :
Returns :
any
|
discussionCsService |
Type : any
|
import { CsLibInitializerService } from './../../../../service/CsLibInitializer/cs-lib-initializer.service';
import { Injectable } from '@angular/core';
import { CsModule } from '@project-sunbird/client-services';
import { FormService } from '@sunbird/core';
@Injectable({
providedIn: 'root'
})
export class DiscussionService {
discussionCsService: any;
constructor(
private csLibInitializerService: CsLibInitializerService,
private formService: FormService
) {
if (!CsModule.instance.isInitialised) {
this.csLibInitializerService.initializeCs();
}
this.discussionCsService = CsModule.instance.discussionService;
}
registerUser(data) {
return this.discussionCsService.createUser(data);
}
getUserDetails(userId) {
return this.discussionCsService.getUserDetails(userId);
}
getForumIds(data) {
return this.discussionCsService.getForumIds(data);
}
attachForum(data) {
return this.discussionCsService.attachForum(data);
}
removeForum(data) {
return this.discussionCsService.removeForum(data);
}
createForum(data) {
return this.discussionCsService.createForum(data);
}
fetchForumConfig(contentType) {
const formServiceInputParams = {
formType: 'forum',
formAction: 'create',
contentType: contentType
};
return this.formService.getFormConfig(formServiceInputParams);
}
}