Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .vs/DNWS/v15/.suo
Binary file not shown.
Binary file added .vs/DNWS2/v15/.suo
Binary file not shown.
3 changes: 3 additions & 0 deletions .vs/ProjectSettings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"CurrentProjectSetting": null
}
10 changes: 10 additions & 0 deletions .vs/VSWorkspaceState.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"ExpandedNodes": [
"",
"\\client",
"\\client\\app",
"\\client\\app\\following"
],
"SelectedNode": "\\DNWS.csproj",
"PreviewInSolutionExplorer": false
}
1,011 changes: 1,011 additions & 0 deletions .vs/config/applicationhost.config

Large diffs are not rendered by default.

Binary file added .vs/slnx.sqlite
Binary file not shown.
12 changes: 7 additions & 5 deletions client/app/following/following.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
<div class="container">
<h4>My Following</h4>
<ul class="list-group">
<li ng-repeat="following in $ctrl.followings" class="list-group-item">
<b>{{following.Name}}</b> <a href="">[unfollow]</a>
</li>
<li ng-repeat="following in $ctrl.followings" class="list-group-item">
<b>{{following.Name}}</b>
<input type="submit" value = "unfollow" ng-click="$ctrl.sendunfollowing(following.Name)" />
</li>
</ul>
Add new follow <input type="text" /> <input type="submit" />
</div>
Add new follow <input type="text" ng-model=$ctrl.followingname /> </textarea>
<input type="submit" ng-click="$ctrl.sendfollowing($ctrl.followingname)" />
</div>
18 changes: 18 additions & 0 deletions client/app/following/following.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,23 @@ angular.module('followingList', ['ngRoute'])
$http.get('http://localhost:8080/twitterapi/following/', requestOptions).then(function (response) {
self.followings = response.data;
});

self.sendfollowing = function sendfollowing(followingname)
{

const data = "followingname=" + encodeURIComponent(followingname);
$http.post('http://localhost:8080/twitterapi/following/', data, requestOptions).then(function (response) {
console.log(data);
});
}

self.sendunfollowing = function sendunfollowing(followingname) {

const data = "followingname=" + encodeURIComponent(followingname);
$http.delete('http://localhost:8080/twitterapi/following/?' + data, requestOptions).then(function (response) {
console.log(response);
});
}

}]
});
209 changes: 209 additions & 0 deletions client/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,10 @@
},
"scripts": {
"postinstall": "bower install",

"update-deps": "npm update",
"postupdate-deps": "bower update",

"prestart": "npm install",
"start": "http-server -a localhost -p 8000 -c-1 ./app",

"update-index-async": "node -e \"var fs=require('fs'),indexFile='app/index-async.html',loaderFile='app/bower_components/angular-loader/angular-loader.min.js',loaderText=fs.readFileSync(loaderFile,'utf-8').split(/sourceMappingURL=angular-loader.min.js.map/).join('sourceMappingURL=bower_components/angular-loader/angular-loader.min.js.map'),indexText=fs.readFileSync(indexFile,'utf-8').split(/\\/\\/@@NG_LOADER_START@@[\\s\\S]*\\/\\/@@NG_LOADER_END@@/).join('//@@NG_LOADER_START@@\\n'+loaderText+' //@@NG_LOADER_END@@');fs.writeFileSync(indexFile,indexText);\""
}
}
2 changes: 1 addition & 1 deletion config.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"Port": "8080",
"ThreadPoolSize" : "10",
"AllowThreadModel" : "Pool|Multi|Single",
"ThreadModel" : "Single",
"ThreadModel" : "Multi",
"Plugins" : [
{
"Path" : "stat",
Expand Down