Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

600611021 #115

Open
wants to merge 1 commit into
base: cpe433
Choose a base branch
from
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.
1,022 changes: 1,022 additions & 0 deletions .vs/config/applicationhost.config

Large diffs are not rendered by default.

Binary file added .vs/slnx.sqlite
Binary file not shown.
13 changes: 8 additions & 5 deletions client/app/following/following.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
<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.Unfollow(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" value="follow" ng-click="$ctrl.Following($ctrl.followingname)"
onClick="document.location.reload(true)" />
</div>
18 changes: 17 additions & 1 deletion client/app/following/following.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,22 @@ angular.module('followingList', ['ngRoute'])

$http.get('http://localhost:8080/twitterapi/following/', requestOptions).then(function (response) {
self.followings = response.data;
});
});

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

self.Unfollow = function Unfollow(followingname) {
const data = "followingname=" + encodeURIComponent(followingname);
$http.delete('http://localhost:8080/twitterapi/following/?' + data, requestOptions).then(function (response) {
console.log(response);
alert("Unfollow " + encodeURIComponent(followingname))
});
}
}]
});
209 changes: 209 additions & 0 deletions client/e2e-tests/package-lock.json

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

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