-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
92e19c0
commit 827721f
Showing
34 changed files
with
650 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
const express = require('express'); | ||
const app = express(); | ||
const router = express.Router(); | ||
|
||
let userService = require('../db/services/user.service'); | ||
|
||
router.get('/userslist',(req, res)=>{ | ||
userService.getAllUsers() | ||
.then(function (data) { | ||
res.status(200).json(data); | ||
}, function(err) { | ||
console.log(err); | ||
// registration failed | ||
res.status(400).json(err); | ||
}) | ||
|
||
}); | ||
|
||
router.post('/addgroup',(req, res)=>{ | ||
// console.log("req",req.body); | ||
userService.addGroup(req.body.group) | ||
.then(function (data) { | ||
res.status(200).json(data); | ||
}, function(err) { | ||
console.log(err); | ||
res.status(400).json(err); | ||
}); | ||
|
||
}); | ||
|
||
router.post('/getgroups',(req, res)=>{ | ||
// console.log(req.body.user); | ||
userService.getGroups(req.body.user) | ||
.then(function (data) { | ||
res.status(200).json(data); | ||
}, function(err) { | ||
console.log(err); | ||
// registration failed | ||
res.status(400).json(err); | ||
}) | ||
|
||
}); | ||
|
||
module.exports = router; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<mat-toolbar>List of All Groups</mat-toolbar> | ||
<mat-list> | ||
<mat-list-item *ngFor="let data of groups" style="width:100%"> | ||
<span style="display: inline-block;width:200px;">{{data.group}}</span> | ||
<button mat-button color="primary" (click)="startChat(data.group)"> Chat</button> | ||
</mat-list-item> | ||
</mat-list> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
||
import { ContactsComponent } from './contacts.component'; | ||
|
||
describe('ContactsComponent', () => { | ||
let component: ContactsComponent; | ||
let fixture: ComponentFixture<ContactsComponent>; | ||
|
||
beforeEach(async(() => { | ||
TestBed.configureTestingModule({ | ||
declarations: [ ContactsComponent ] | ||
}) | ||
.compileComponents(); | ||
})); | ||
|
||
beforeEach(() => { | ||
fixture = TestBed.createComponent(ContactsComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
Oops, something went wrong.