Skip to content

Commit 343cab6

Browse files
author
Jon Myrick
authored
Merge pull request CodewarsClone#118 from CodewarsClone/branchFri
Branch fri
2 parents e132b08 + 07d0f6e commit 343cab6

3 files changed

Lines changed: 32 additions & 11 deletions

File tree

README.md

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,9 @@ We made this as a group project for our dev bootcamp
1616
* Angular 1.5
1717
* Express
1818
* Node
19-
* (most javascript was written with ES2015 complied by gulp)
19+
* (most javascript was written with ES2015 compiled by gulp)
2020
* Postgres
2121

22-
2322
### Minor Techs used
2423

2524
* JQuery
@@ -36,3 +35,29 @@ We have docker installed and brought down codewars/base-runner & codewars/node-r
3635
Codewars Runner uses the Mocha unit-testing framework so the test have been written in mocha.
3736

3837
In node we are using exec to run a CLI to invoke docker and this image and then parsing the response into an object that allows the front-end to display with the describes and its correctly
38+
39+
## How the Site Works
40+
41+
### Login
42+
43+
Using Github OAuth . . .
44+
45+
### Home
46+
47+
See completed katas and your solutions to them
48+
49+
Choose a random kata according to your kyu level range . . .
50+
51+
### Training
52+
53+
Complete the function
54+
55+
run tests and see if you have passed . . .
56+
57+
### Solutions
58+
59+
See all the solutions for that kata . . .
60+
61+
### List of All Katas
62+
63+
Sort through all of the katas and choose one to train . . .

src/components/home/homeCtrl.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ angular.module('app').controller('homeCtrl', function($scope, $state, mainServic
55
mainService.checkAuth();
66
$scope.languageOptions = ["JavaScript", "Ruby", "C++"];
77
$scope.progressOptions = ["Fundamentals", "Rank Up", "Practice and Repeat", "Beta", "Random"];
8+
89
//Dummy userKatas for purposes of styling.
910
// $scope.userKatas = [{kyu: 8, id: 1, name: "Kata name", script: "var a = 1", tags: ['FUNDAMENTALS'], user_id: 2},{kyu: 8, id: 2, name: "Kata name", script: "var a = 1", tags: ['FUNDAMENTALS'], user_id: 2},{kyu: 8, id: 3, name: "Kata name", script: "var a = 1", tags: ['FUNDAMENTALS']}]
1011

@@ -40,8 +41,12 @@ angular.module('app').controller('homeCtrl', function($scope, $state, mainServic
4041

4142
$scope.getUserKatas = (userid) => {
4243
mainService.getUserKatas(userid).then(response => {
44+
<<<<<<< HEAD
45+
$scope.userKatas = response.data;
46+
=======
4347
$scope.userKatas = response.data;
4448
console.log($scope.userKatas);
49+
>>>>>>> master
4550
})
4651
}
4752

src/components/mainService.js

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ angular.module('app').service('mainService', function($http, $q, $sce, $state) {
44

55
// $sce.trustAsResourceUrl('/s');
66

7-
// Dummy information so I don't have to mess with the server all the time.
8-
// this.user = {id: 4, github_id: "20197415", name: "Steven", email: null, picture_url: "https://avatars.githubusercontent.com/u/20197415?v=3", username: "Steven-Nagie"};
97
this.user = {};
108

119
// POST
@@ -43,7 +41,6 @@ angular.module('app').service('mainService', function($http, $q, $sce, $state) {
4341
});
4442
};
4543

46-
//kata_listCtrl
4744
this.searchKatasByName = (input) => {
4845
return $http({
4946
method: 'POST',
@@ -86,47 +83,41 @@ angular.module('app').service('mainService', function($http, $q, $sce, $state) {
8683
})
8784
};
8885

89-
// trainingCtrl
9086
this.getKataById = (kataid) => {
9187
return $http({
9288
method: 'GET',
9389
url: `/api/kata/` + kataid
9490
});
9591
};
9692

97-
// homeCtrl - displaying one kata within range
9893
this.getRandomKata = (userkyu) => {
9994
return $http({
10095
method: 'GET',
10196
url: `/api/random-kata/${userkyu}`
10297
});
10398
};
10499

105-
// kata_listCtrl = displays a plethora of katas based on user ability
106100
this.getRandomKataList = (userkyu) => {
107101
return $http({
108102
method: 'GET',
109103
url: `/api/random-kata-list/${userkyu}`
110104
});
111105
};
112106

113-
// kata_listCtrl
114107
this.getKatasByKyu = (kyu) => {
115108
return $http({
116109
method: 'GET',
117110
url: `/api/katas-by-kyu/` + kyu
118111
});
119112
};
120113

121-
// solutionsCtrl
122114
this.getKataSolutions = (kataid) => {
123115
return $http({
124116
method: 'GET',
125117
url: `/api/solutions/` + kataid
126118
});
127119
};
128120

129-
// profileCtrl - brings back a specific users kata information (script, name, kyu, description) - use on kata tab soltion tab
130121
this.getUserKatas = (userid) => {
131122
return $http({
132123
method: 'GET',

0 commit comments

Comments
 (0)