Fakultas Ilmu Komputer UI

Commit f64c9891 authored by M. Reza Qorib's avatar M. Reza Qorib
Browse files

[#140654507] #12 #13 fix typo on Server component name

parent 4a3f519a
......@@ -17593,7 +17593,7 @@
/* 857 */
/***/ function(module, exports, __webpack_require__) {
 
'use strict';var cov_19cqw5u33c=function(){var path="A:\\Kuliah\\Semester 6\\PPL\\kape\\assets\\js\\lib\\server.jsx",hash="9260dc7e53618dbf25500135c5600da03b3c1fb7",global=new Function('return this')(),gcv="__coverage__",coverageData={path:"A:\\Kuliah\\Semester 6\\PPL\\kape\\assets\\js\\lib\\server.jsx",statementMap:{"0":{start:{line:3,column:0},end:{line:5,column:3}},"1":{start:{line:7,column:19},end:{line:7,column:563}},"2":{start:{line:7,column:76},end:{line:7,column:347}},"3":{start:{line:7,column:134},end:{line:7,column:142}},"4":{start:{line:7,column:144},end:{line:7,column:199}},"5":{start:{line:7,column:200},end:{line:7,column:231}},"6":{start:{line:7,column:232},end:{line:7,column:286}},"7":{start:{line:7,column:259},end:{line:7,column:286}},"8":{start:{line:7,column:287},end:{line:7,column:345}},"9":{start:{line:7,column:350},end:{line:7,column:559}},"10":{start:{line:7,column:407},end:{line:7,column:475}},"11":{start:{line:7,column:423},end:{line:7,column:475}},"12":{start:{line:7,column:476},end:{line:7,column:536}},"13":{start:{line:7,column:493},end:{line:7,column:536}},"14":{start:{line:7,column:537},end:{line:7,column:556}},"15":{start:{line:9,column:14},end:{line:9,column:33}},"16":{start:{line:11,column:15},end:{line:11,column:46}},"17":{start:{line:13,column:15},end:{line:13,column:35}},"18":{start:{line:15,column:16},end:{line:15,column:48}},"19":{start:{line:17,column:39},end:{line:17,column:93}},"20":{start:{line:19,column:50},end:{line:19,column:151}},"21":{start:{line:19,column:92},end:{line:19,column:149}},"22":{start:{line:21,column:13},end:{line:127,column:3}},"23":{start:{line:23,column:4},end:{line:23,column:34}},"24":{start:{line:26,column:2},end:{line:124,column:6}},"25":{start:{line:29,column:24},end:{line:29,column:28}},"26":{start:{line:30,column:6},end:{line:40,column:7}},"27":{start:{line:31,column:22},end:{line:31,column:48}},"28":{start:{line:32,column:8},end:{line:39,column:9}},"29":{start:{line:33,column:23},end:{line:33,column:40}},"30":{start:{line:35,column:10},end:{line:38,column:11}},"31":{start:{line:36,column:12},end:{line:36,column:80}},"32":{start:{line:37,column:12},end:{line:37,column:18}},"33":{start:{line:41,column:6},end:{line:41,column:25}},"34":{start:{line:46,column:21},end:{line:46,column:94}},"35":{start:{line:48,column:16},end:{line:48,column:29}},"36":{start:{line:49,column:22},end:{line:49,column:49}},"37":{start:{line:50,column:20},end:{line:54,column:7}},"38":{start:{line:55,column:24},end:{line:60,column:7}},"39":{start:{line:63,column:20},end:{line:63,column:43}},"40":{start:{line:64,column:20},end:{line:73,column:8}},"41":{start:{line:66,column:8},end:{line:68,column:9}},"42":{start:{line:67,column:10},end:{line:67,column:25}},"43":{start:{line:69,column:8},end:{line:71,column:9}},"44":{start:{line:70,column:10},end:{line:70,column:26}},"45":{start:{line:72,column:8},end:{line:72,column:31}},"46":{start:{line:75,column:6},end:{line:82,column:9}},"47":{start:{line:76,column:8},end:{line:76,column:70}},"48":{start:{line:77,column:8},end:{line:77,column:46}},"49":{start:{line:78,column:8},end:{line:78,column:24}},"50":{start:{line:80,column:8},end:{line:80,column:70}},"51":{start:{line:81,column:8},end:{line:81,column:24}},"52":{start:{line:87,column:21},end:{line:87,column:93}},"53":{start:{line:89,column:6},end:{line:89,column:148}},"54":{start:{line:94,column:6},end:{line:94,column:50}},"55":{start:{line:99,column:6},end:{line:99,column:51}},"56":{start:{line:107,column:6},end:{line:107,column:50}},"57":{start:{line:112,column:20},end:{line:112,column:40}},"58":{start:{line:113,column:6},end:{line:113,column:38}},"59":{start:{line:114,column:6},end:{line:114,column:31}},"60":{start:{line:115,column:6},end:{line:115,column:30}},"61":{start:{line:116,column:6},end:{line:116,column:61}},"62":{start:{line:117,column:6},end:{line:117,column:35}},"63":{start:{line:122,column:6},end:{line:122,column:41}},"64":{start:{line:126,column:2},end:{line:126,column:16}},"65":{start:{line:129,column:0},end:{line:129,column:25}}},fnMap:{"0":{name:"(anonymous_0)",decl:{start:{line:7,column:19},end:{line:7,column:20}},loc:{start:{line:7,column:31},end:{line:7,column:561}}},"1":{name:"defineProperties",decl:{start:{line:7,column:42},end:{line:7,column:58}},loc:{start:{line:7,column:74},end:{line:7,column:349}}},"2":{name:"(anonymous_2)",decl:{start:{line:7,column:357},end:{line:7,column:358}},loc:{start:{line:7,column:405},end:{line:7,column:558}}},"3":{name:"_interopRequireDefault",decl:{start:{line:17,column:9},end:{line:17,column:31}},loc:{start:{line:17,column:37},end:{line:17,column:95}}},"4":{name:"_classCallCheck",decl:{start:{line:19,column:9},end:{line:19,column:24}},loc:{start:{line:19,column:48},end:{line:19,column:153}}},"5":{name:"(anonymous_5)",decl:{start:{line:21,column:13},end:{line:21,column:14}},loc:{start:{line:21,column:25},end:{line:127,column:1}}},"6":{name:"Server",decl:{start:{line:22,column:11},end:{line:22,column:17}},loc:{start:{line:22,column:20},end:{line:24,column:3}}},"7":{name:"getCookie",decl:{start:{line:28,column:20},end:{line:28,column:29}},loc:{start:{line:28,column:36},end:{line:42,column:5}}},"8":{name:"sendRequest",decl:{start:{line:45,column:20},end:{line:45,column:31}},loc:{start:{line:45,column:52},end:{line:83,column:5}}},"9":{name:"(anonymous_9)",decl:{start:{line:64,column:33},end:{line:64,column:34}},loc:{start:{line:64,column:53},end:{line:73,column:7}}},"10":{name:"(anonymous_10)",decl:{start:{line:75,column:37},end:{line:75,column:38}},loc:{start:{line:75,column:57},end:{line:79,column:7}}},"11":{name:"(anonymous_11)",decl:{start:{line:79,column:24},end:{line:79,column:25}},loc:{start:{line:79,column:44},end:{line:82,column:7}}},"12":{name:"get",decl:{start:{line:86,column:20},end:{line:86,column:23}},loc:{start:{line:86,column:30},end:{line:90,column:5}}},"13":{name:"post",decl:{start:{line:93,column:20},end:{line:93,column:24}},loc:{start:{line:93,column:37},end:{line:95,column:5}}},"14":{name:"patch",decl:{start:{line:98,column:20},end:{line:98,column:25}},loc:{start:{line:98,column:38},end:{line:100,column:5}}},"15":{name:"_delete",decl:{start:{line:106,column:20},end:{line:106,column:27}},loc:{start:{line:106,column:34},end:{line:108,column:5}}},"16":{name:"request",decl:{start:{line:111,column:20},end:{line:111,column:27}},loc:{start:{line:111,column:66},end:{line:118,column:5}}},"17":{name:"isLoggedIn",decl:{start:{line:121,column:20},end:{line:121,column:30}},loc:{start:{line:121,column:33},end:{line:123,column:5}}}},branchMap:{"0":{loc:{start:{line:7,column:168},end:{line:7,column:198}},type:"binary-expr",locations:[{start:{line:7,column:168},end:{line:7,column:189}},{start:{line:7,column:193},end:{line:7,column:198}}]},"1":{loc:{start:{line:7,column:232},end:{line:7,column:286}},type:"if",locations:[{start:{line:7,column:232},end:{line:7,column:286}},{start:{line:7,column:232},end:{line:7,column:286}}]},"2":{loc:{start:{line:7,column:407},end:{line:7,column:475}},type:"if",locations:[{start:{line:7,column:407},end:{line:7,column:475}},{start:{line:7,column:407},end:{line:7,column:475}}]},"3":{loc:{start:{line:7,column:476},end:{line:7,column:536}},type:"if",locations:[{start:{line:7,column:476},end:{line:7,column:536}},{start:{line:7,column:476},end:{line:7,column:536}}]},"4":{loc:{start:{line:17,column:46},end:{line:17,column:92}},type:"cond-expr",locations:[{start:{line:17,column:70},end:{line:17,column:73}},{start:{line:17,column:76},end:{line:17,column:92}}]},"5":{loc:{start:{line:17,column:46},end:{line:17,column:67}},type:"binary-expr",locations:[{start:{line:17,column:46},end:{line:17,column:49}},{start:{line:17,column:53},end:{line:17,column:67}}]},"6":{loc:{start:{line:19,column:50},end:{line:19,column:151}},type:"if",locations:[{start:{line:19,column:50},end:{line:19,column:151}},{start:{line:19,column:50},end:{line:19,column:151}}]},"7":{loc:{start:{line:30,column:6},end:{line:40,column:7}},type:"if",locations:[{start:{line:30,column:6},end:{line:40,column:7}},{start:{line:30,column:6},end:{line:40,column:7}}]},"8":{loc:{start:{line:30,column:10},end:{line:30,column:51}},type:"binary-expr",locations:[{start:{line:30,column:10},end:{line:30,column:25}},{start:{line:30,column:29},end:{line:30,column:51}}]},"9":{loc:{start:{line:35,column:10},end:{line:38,column:11}},type:"if",locations:[{start:{line:35,column:10},end:{line:38,column:11}},{start:{line:35,column:10},end:{line:38,column:11}}]},"10":{loc:{start:{line:46,column:21},end:{line:46,column:94}},type:"cond-expr",locations:[{start:{line:46,column:74},end:{line:46,column:86}},{start:{line:46,column:89},end:{line:46,column:94}}]},"11":{loc:{start:{line:46,column:21},end:{line:46,column:71}},type:"binary-expr",locations:[{start:{line:46,column:21},end:{line:46,column:41}},{start:{line:46,column:45},end:{line:46,column:71}}]},"12":{loc:{start:{line:58,column:14},end:{line:58,column:62}},type:"cond-expr",locations:[{start:{line:58,column:30},end:{line:58,column:50}},{start:{line:58,column:53},end:{line:58,column:62}}]},"13":{loc:{start:{line:66,column:8},end:{line:68,column:9}},type:"if",locations:[{start:{line:66,column:8},end:{line:68,column:9}},{start:{line:66,column:8},end:{line:68,column:9}}]},"14":{loc:{start:{line:66,column:12},end:{line:66,column:58}},type:"binary-expr",locations:[{start:{line:66,column:12},end:{line:66,column:33}},{start:{line:66,column:37},end:{line:66,column:58}}]},"15":{loc:{start:{line:69,column:8},end:{line:71,column:9}},type:"if",locations:[{start:{line:69,column:8},end:{line:71,column:9}},{start:{line:69,column:8},end:{line:71,column:9}}]},"16":{loc:{start:{line:75,column:13},end:{line:82,column:8}},type:"cond-expr",locations:[{start:{line:75,column:24},end:{line:79,column:8}},{start:{line:79,column:11},end:{line:82,column:8}}]},"17":{loc:{start:{line:87,column:21},end:{line:87,column:93}},type:"cond-expr",locations:[{start:{line:87,column:74},end:{line:87,column:86}},{start:{line:87,column:89},end:{line:87,column:93}}]},"18":{loc:{start:{line:87,column:21},end:{line:87,column:71}},type:"binary-expr",locations:[{start:{line:87,column:21},end:{line:87,column:41}},{start:{line:87,column:45},end:{line:87,column:71}}]},"19":{loc:{start:{line:89,column:13},end:{line:89,column:147}},type:"cond-expr",locations:[{start:{line:89,column:55},end:{line:89,column:99}},{start:{line:89,column:102},end:{line:89,column:147}}]},"20":{loc:{start:{line:89,column:13},end:{line:89,column:52}},type:"binary-expr",locations:[{start:{line:89,column:13},end:{line:89,column:21}},{start:{line:89,column:25},end:{line:89,column:52}}]}},s:{"0":0,"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"59":0,"60":0,"61":0,"62":0,"63":0,"64":0,"65":0},f:{"0":0,"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0},b:{"0":[0,0],"1":[0,0],"2":[0,0],"3":[0,0],"4":[0,0],"5":[0,0],"6":[0,0],"7":[0,0],"8":[0,0],"9":[0,0],"10":[0,0],"11":[0,0],"12":[0,0],"13":[0,0],"14":[0,0],"15":[0,0],"16":[0,0],"17":[0,0],"18":[0,0],"19":[0,0],"20":[0,0]},inputSourceMap:null,_coverageSchema:"332fd63041d2c1bcb487cc26dd0d5f7d97098a6c"},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();++cov_19cqw5u33c.s[0];Object.defineProperty(exports,"__esModule",{value:true});var _createClass=(++cov_19cqw5u33c.s[1],function(){++cov_19cqw5u33c.f[0];function defineProperties(target,props){++cov_19cqw5u33c.f[1];++cov_19cqw5u33c.s[2];for(var i=0;i<props.length;i++){var descriptor=(++cov_19cqw5u33c.s[3],props[i]);++cov_19cqw5u33c.s[4];descriptor.enumerable=(++cov_19cqw5u33c.b[0][0],descriptor.enumerable)||(++cov_19cqw5u33c.b[0][1],false);++cov_19cqw5u33c.s[5];descriptor.configurable=true;++cov_19cqw5u33c.s[6];if("value"in descriptor){++cov_19cqw5u33c.b[1][0];++cov_19cqw5u33c.s[7];descriptor.writable=true;}else{++cov_19cqw5u33c.b[1][1];}++cov_19cqw5u33c.s[8];Object.defineProperty(target,descriptor.key,descriptor);}}++cov_19cqw5u33c.s[9];return function(Constructor,protoProps,staticProps){++cov_19cqw5u33c.f[2];++cov_19cqw5u33c.s[10];if(protoProps){++cov_19cqw5u33c.b[2][0];++cov_19cqw5u33c.s[11];defineProperties(Constructor.prototype,protoProps);}else{++cov_19cqw5u33c.b[2][1];}++cov_19cqw5u33c.s[12];if(staticProps){++cov_19cqw5u33c.b[3][0];++cov_19cqw5u33c.s[13];defineProperties(Constructor,staticProps);}else{++cov_19cqw5u33c.b[3][1];}++cov_19cqw5u33c.s[14];return Constructor;};}());var _logger=(++cov_19cqw5u33c.s[15],__webpack_require__(858));var _logger2=(++cov_19cqw5u33c.s[16],_interopRequireDefault(_logger));var _storage=(++cov_19cqw5u33c.s[17],__webpack_require__(859));var _storage2=(++cov_19cqw5u33c.s[18],_interopRequireDefault(_storage));function _interopRequireDefault(obj){++cov_19cqw5u33c.f[3];++cov_19cqw5u33c.s[19];return(++cov_19cqw5u33c.b[5][0],obj)&&(++cov_19cqw5u33c.b[5][1],obj.__esModule)?(++cov_19cqw5u33c.b[4][0],obj):(++cov_19cqw5u33c.b[4][1],{default:obj});}function _classCallCheck(instance,Constructor){++cov_19cqw5u33c.f[4];++cov_19cqw5u33c.s[20];if(!(instance instanceof Constructor)){++cov_19cqw5u33c.b[6][0];++cov_19cqw5u33c.s[21];throw new TypeError("Cannot call a class as a function");}else{++cov_19cqw5u33c.b[6][1];}}var Server=(++cov_19cqw5u33c.s[22],function(){++cov_19cqw5u33c.f[5];function Server(){++cov_19cqw5u33c.f[6];++cov_19cqw5u33c.s[23];_classCallCheck(this,Server);}++cov_19cqw5u33c.s[24];_createClass(Server,null,[{key:'getCookie',value:function getCookie(name){++cov_19cqw5u33c.f[7];var cookieValue=(++cov_19cqw5u33c.s[25],null);++cov_19cqw5u33c.s[26];if((++cov_19cqw5u33c.b[8][0],document.cookie)&&(++cov_19cqw5u33c.b[8][1],document.cookie!=='')){++cov_19cqw5u33c.b[7][0];var cookies=(++cov_19cqw5u33c.s[27],document.cookie.split(';'));++cov_19cqw5u33c.s[28];for(var i=0;i<cookies.length;i+=1){var cookie=(++cov_19cqw5u33c.s[29],cookies[i].trim());// Does this cookie string begin with the name we want?
'use strict';var cov_19cqw5u33c=function(){var path="A:\\Kuliah\\Semester 6\\PPL\\kape\\assets\\js\\lib\\Server.jsx",hash="9260dc7e53618dbf25500135c5600da03b3c1fb7",global=new Function('return this')(),gcv="__coverage__",coverageData={path:"A:\\Kuliah\\Semester 6\\PPL\\kape\\assets\\js\\lib\\Server.jsx",statementMap:{"0":{start:{line:3,column:0},end:{line:5,column:3}},"1":{start:{line:7,column:19},end:{line:7,column:563}},"2":{start:{line:7,column:76},end:{line:7,column:347}},"3":{start:{line:7,column:134},end:{line:7,column:142}},"4":{start:{line:7,column:144},end:{line:7,column:199}},"5":{start:{line:7,column:200},end:{line:7,column:231}},"6":{start:{line:7,column:232},end:{line:7,column:286}},"7":{start:{line:7,column:259},end:{line:7,column:286}},"8":{start:{line:7,column:287},end:{line:7,column:345}},"9":{start:{line:7,column:350},end:{line:7,column:559}},"10":{start:{line:7,column:407},end:{line:7,column:475}},"11":{start:{line:7,column:423},end:{line:7,column:475}},"12":{start:{line:7,column:476},end:{line:7,column:536}},"13":{start:{line:7,column:493},end:{line:7,column:536}},"14":{start:{line:7,column:537},end:{line:7,column:556}},"15":{start:{line:9,column:14},end:{line:9,column:33}},"16":{start:{line:11,column:15},end:{line:11,column:46}},"17":{start:{line:13,column:15},end:{line:13,column:35}},"18":{start:{line:15,column:16},end:{line:15,column:48}},"19":{start:{line:17,column:39},end:{line:17,column:93}},"20":{start:{line:19,column:50},end:{line:19,column:151}},"21":{start:{line:19,column:92},end:{line:19,column:149}},"22":{start:{line:21,column:13},end:{line:127,column:3}},"23":{start:{line:23,column:4},end:{line:23,column:34}},"24":{start:{line:26,column:2},end:{line:124,column:6}},"25":{start:{line:29,column:24},end:{line:29,column:28}},"26":{start:{line:30,column:6},end:{line:40,column:7}},"27":{start:{line:31,column:22},end:{line:31,column:48}},"28":{start:{line:32,column:8},end:{line:39,column:9}},"29":{start:{line:33,column:23},end:{line:33,column:40}},"30":{start:{line:35,column:10},end:{line:38,column:11}},"31":{start:{line:36,column:12},end:{line:36,column:80}},"32":{start:{line:37,column:12},end:{line:37,column:18}},"33":{start:{line:41,column:6},end:{line:41,column:25}},"34":{start:{line:46,column:21},end:{line:46,column:94}},"35":{start:{line:48,column:16},end:{line:48,column:29}},"36":{start:{line:49,column:22},end:{line:49,column:49}},"37":{start:{line:50,column:20},end:{line:54,column:7}},"38":{start:{line:55,column:24},end:{line:60,column:7}},"39":{start:{line:63,column:20},end:{line:63,column:43}},"40":{start:{line:64,column:20},end:{line:73,column:8}},"41":{start:{line:66,column:8},end:{line:68,column:9}},"42":{start:{line:67,column:10},end:{line:67,column:25}},"43":{start:{line:69,column:8},end:{line:71,column:9}},"44":{start:{line:70,column:10},end:{line:70,column:26}},"45":{start:{line:72,column:8},end:{line:72,column:31}},"46":{start:{line:75,column:6},end:{line:82,column:9}},"47":{start:{line:76,column:8},end:{line:76,column:70}},"48":{start:{line:77,column:8},end:{line:77,column:46}},"49":{start:{line:78,column:8},end:{line:78,column:24}},"50":{start:{line:80,column:8},end:{line:80,column:70}},"51":{start:{line:81,column:8},end:{line:81,column:24}},"52":{start:{line:87,column:21},end:{line:87,column:93}},"53":{start:{line:89,column:6},end:{line:89,column:148}},"54":{start:{line:94,column:6},end:{line:94,column:50}},"55":{start:{line:99,column:6},end:{line:99,column:51}},"56":{start:{line:107,column:6},end:{line:107,column:50}},"57":{start:{line:112,column:20},end:{line:112,column:40}},"58":{start:{line:113,column:6},end:{line:113,column:38}},"59":{start:{line:114,column:6},end:{line:114,column:31}},"60":{start:{line:115,column:6},end:{line:115,column:30}},"61":{start:{line:116,column:6},end:{line:116,column:61}},"62":{start:{line:117,column:6},end:{line:117,column:35}},"63":{start:{line:122,column:6},end:{line:122,column:41}},"64":{start:{line:126,column:2},end:{line:126,column:16}},"65":{start:{line:129,column:0},end:{line:129,column:25}}},fnMap:{"0":{name:"(anonymous_0)",decl:{start:{line:7,column:19},end:{line:7,column:20}},loc:{start:{line:7,column:31},end:{line:7,column:561}}},"1":{name:"defineProperties",decl:{start:{line:7,column:42},end:{line:7,column:58}},loc:{start:{line:7,column:74},end:{line:7,column:349}}},"2":{name:"(anonymous_2)",decl:{start:{line:7,column:357},end:{line:7,column:358}},loc:{start:{line:7,column:405},end:{line:7,column:558}}},"3":{name:"_interopRequireDefault",decl:{start:{line:17,column:9},end:{line:17,column:31}},loc:{start:{line:17,column:37},end:{line:17,column:95}}},"4":{name:"_classCallCheck",decl:{start:{line:19,column:9},end:{line:19,column:24}},loc:{start:{line:19,column:48},end:{line:19,column:153}}},"5":{name:"(anonymous_5)",decl:{start:{line:21,column:13},end:{line:21,column:14}},loc:{start:{line:21,column:25},end:{line:127,column:1}}},"6":{name:"Server",decl:{start:{line:22,column:11},end:{line:22,column:17}},loc:{start:{line:22,column:20},end:{line:24,column:3}}},"7":{name:"getCookie",decl:{start:{line:28,column:20},end:{line:28,column:29}},loc:{start:{line:28,column:36},end:{line:42,column:5}}},"8":{name:"sendRequest",decl:{start:{line:45,column:20},end:{line:45,column:31}},loc:{start:{line:45,column:52},end:{line:83,column:5}}},"9":{name:"(anonymous_9)",decl:{start:{line:64,column:33},end:{line:64,column:34}},loc:{start:{line:64,column:53},end:{line:73,column:7}}},"10":{name:"(anonymous_10)",decl:{start:{line:75,column:37},end:{line:75,column:38}},loc:{start:{line:75,column:57},end:{line:79,column:7}}},"11":{name:"(anonymous_11)",decl:{start:{line:79,column:24},end:{line:79,column:25}},loc:{start:{line:79,column:44},end:{line:82,column:7}}},"12":{name:"get",decl:{start:{line:86,column:20},end:{line:86,column:23}},loc:{start:{line:86,column:30},end:{line:90,column:5}}},"13":{name:"post",decl:{start:{line:93,column:20},end:{line:93,column:24}},loc:{start:{line:93,column:37},end:{line:95,column:5}}},"14":{name:"patch",decl:{start:{line:98,column:20},end:{line:98,column:25}},loc:{start:{line:98,column:38},end:{line:100,column:5}}},"15":{name:"_delete",decl:{start:{line:106,column:20},end:{line:106,column:27}},loc:{start:{line:106,column:34},end:{line:108,column:5}}},"16":{name:"request",decl:{start:{line:111,column:20},end:{line:111,column:27}},loc:{start:{line:111,column:66},end:{line:118,column:5}}},"17":{name:"isLoggedIn",decl:{start:{line:121,column:20},end:{line:121,column:30}},loc:{start:{line:121,column:33},end:{line:123,column:5}}}},branchMap:{"0":{loc:{start:{line:7,column:168},end:{line:7,column:198}},type:"binary-expr",locations:[{start:{line:7,column:168},end:{line:7,column:189}},{start:{line:7,column:193},end:{line:7,column:198}}]},"1":{loc:{start:{line:7,column:232},end:{line:7,column:286}},type:"if",locations:[{start:{line:7,column:232},end:{line:7,column:286}},{start:{line:7,column:232},end:{line:7,column:286}}]},"2":{loc:{start:{line:7,column:407},end:{line:7,column:475}},type:"if",locations:[{start:{line:7,column:407},end:{line:7,column:475}},{start:{line:7,column:407},end:{line:7,column:475}}]},"3":{loc:{start:{line:7,column:476},end:{line:7,column:536}},type:"if",locations:[{start:{line:7,column:476},end:{line:7,column:536}},{start:{line:7,column:476},end:{line:7,column:536}}]},"4":{loc:{start:{line:17,column:46},end:{line:17,column:92}},type:"cond-expr",locations:[{start:{line:17,column:70},end:{line:17,column:73}},{start:{line:17,column:76},end:{line:17,column:92}}]},"5":{loc:{start:{line:17,column:46},end:{line:17,column:67}},type:"binary-expr",locations:[{start:{line:17,column:46},end:{line:17,column:49}},{start:{line:17,column:53},end:{line:17,column:67}}]},"6":{loc:{start:{line:19,column:50},end:{line:19,column:151}},type:"if",locations:[{start:{line:19,column:50},end:{line:19,column:151}},{start:{line:19,column:50},end:{line:19,column:151}}]},"7":{loc:{start:{line:30,column:6},end:{line:40,column:7}},type:"if",locations:[{start:{line:30,column:6},end:{line:40,column:7}},{start:{line:30,column:6},end:{line:40,column:7}}]},"8":{loc:{start:{line:30,column:10},end:{line:30,column:51}},type:"binary-expr",locations:[{start:{line:30,column:10},end:{line:30,column:25}},{start:{line:30,column:29},end:{line:30,column:51}}]},"9":{loc:{start:{line:35,column:10},end:{line:38,column:11}},type:"if",locations:[{start:{line:35,column:10},end:{line:38,column:11}},{start:{line:35,column:10},end:{line:38,column:11}}]},"10":{loc:{start:{line:46,column:21},end:{line:46,column:94}},type:"cond-expr",locations:[{start:{line:46,column:74},end:{line:46,column:86}},{start:{line:46,column:89},end:{line:46,column:94}}]},"11":{loc:{start:{line:46,column:21},end:{line:46,column:71}},type:"binary-expr",locations:[{start:{line:46,column:21},end:{line:46,column:41}},{start:{line:46,column:45},end:{line:46,column:71}}]},"12":{loc:{start:{line:58,column:14},end:{line:58,column:62}},type:"cond-expr",locations:[{start:{line:58,column:30},end:{line:58,column:50}},{start:{line:58,column:53},end:{line:58,column:62}}]},"13":{loc:{start:{line:66,column:8},end:{line:68,column:9}},type:"if",locations:[{start:{line:66,column:8},end:{line:68,column:9}},{start:{line:66,column:8},end:{line:68,column:9}}]},"14":{loc:{start:{line:66,column:12},end:{line:66,column:58}},type:"binary-expr",locations:[{start:{line:66,column:12},end:{line:66,column:33}},{start:{line:66,column:37},end:{line:66,column:58}}]},"15":{loc:{start:{line:69,column:8},end:{line:71,column:9}},type:"if",locations:[{start:{line:69,column:8},end:{line:71,column:9}},{start:{line:69,column:8},end:{line:71,column:9}}]},"16":{loc:{start:{line:75,column:13},end:{line:82,column:8}},type:"cond-expr",locations:[{start:{line:75,column:24},end:{line:79,column:8}},{start:{line:79,column:11},end:{line:82,column:8}}]},"17":{loc:{start:{line:87,column:21},end:{line:87,column:93}},type:"cond-expr",locations:[{start:{line:87,column:74},end:{line:87,column:86}},{start:{line:87,column:89},end:{line:87,column:93}}]},"18":{loc:{start:{line:87,column:21},end:{line:87,column:71}},type:"binary-expr",locations:[{start:{line:87,column:21},end:{line:87,column:41}},{start:{line:87,column:45},end:{line:87,column:71}}]},"19":{loc:{start:{line:89,column:13},end:{line:89,column:147}},type:"cond-expr",locations:[{start:{line:89,column:55},end:{line:89,column:99}},{start:{line:89,column:102},end:{line:89,column:147}}]},"20":{loc:{start:{line:89,column:13},end:{line:89,column:52}},type:"binary-expr",locations:[{start:{line:89,column:13},end:{line:89,column:21}},{start:{line:89,column:25},end:{line:89,column:52}}]}},s:{"0":0,"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"59":0,"60":0,"61":0,"62":0,"63":0,"64":0,"65":0},f:{"0":0,"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0},b:{"0":[0,0],"1":[0,0],"2":[0,0],"3":[0,0],"4":[0,0],"5":[0,0],"6":[0,0],"7":[0,0],"8":[0,0],"9":[0,0],"10":[0,0],"11":[0,0],"12":[0,0],"13":[0,0],"14":[0,0],"15":[0,0],"16":[0,0],"17":[0,0],"18":[0,0],"19":[0,0],"20":[0,0]},inputSourceMap:null,_coverageSchema:"332fd63041d2c1bcb487cc26dd0d5f7d97098a6c"},coverage=global[gcv]||(global[gcv]={});if(coverage[path]&&coverage[path].hash===hash){return coverage[path];}coverageData.hash=hash;return coverage[path]=coverageData;}();++cov_19cqw5u33c.s[0];Object.defineProperty(exports,"__esModule",{value:true});var _createClass=(++cov_19cqw5u33c.s[1],function(){++cov_19cqw5u33c.f[0];function defineProperties(target,props){++cov_19cqw5u33c.f[1];++cov_19cqw5u33c.s[2];for(var i=0;i<props.length;i++){var descriptor=(++cov_19cqw5u33c.s[3],props[i]);++cov_19cqw5u33c.s[4];descriptor.enumerable=(++cov_19cqw5u33c.b[0][0],descriptor.enumerable)||(++cov_19cqw5u33c.b[0][1],false);++cov_19cqw5u33c.s[5];descriptor.configurable=true;++cov_19cqw5u33c.s[6];if("value"in descriptor){++cov_19cqw5u33c.b[1][0];++cov_19cqw5u33c.s[7];descriptor.writable=true;}else{++cov_19cqw5u33c.b[1][1];}++cov_19cqw5u33c.s[8];Object.defineProperty(target,descriptor.key,descriptor);}}++cov_19cqw5u33c.s[9];return function(Constructor,protoProps,staticProps){++cov_19cqw5u33c.f[2];++cov_19cqw5u33c.s[10];if(protoProps){++cov_19cqw5u33c.b[2][0];++cov_19cqw5u33c.s[11];defineProperties(Constructor.prototype,protoProps);}else{++cov_19cqw5u33c.b[2][1];}++cov_19cqw5u33c.s[12];if(staticProps){++cov_19cqw5u33c.b[3][0];++cov_19cqw5u33c.s[13];defineProperties(Constructor,staticProps);}else{++cov_19cqw5u33c.b[3][1];}++cov_19cqw5u33c.s[14];return Constructor;};}());var _logger=(++cov_19cqw5u33c.s[15],__webpack_require__(858));var _logger2=(++cov_19cqw5u33c.s[16],_interopRequireDefault(_logger));var _storage=(++cov_19cqw5u33c.s[17],__webpack_require__(859));var _storage2=(++cov_19cqw5u33c.s[18],_interopRequireDefault(_storage));function _interopRequireDefault(obj){++cov_19cqw5u33c.f[3];++cov_19cqw5u33c.s[19];return(++cov_19cqw5u33c.b[5][0],obj)&&(++cov_19cqw5u33c.b[5][1],obj.__esModule)?(++cov_19cqw5u33c.b[4][0],obj):(++cov_19cqw5u33c.b[4][1],{default:obj});}function _classCallCheck(instance,Constructor){++cov_19cqw5u33c.f[4];++cov_19cqw5u33c.s[20];if(!(instance instanceof Constructor)){++cov_19cqw5u33c.b[6][0];++cov_19cqw5u33c.s[21];throw new TypeError("Cannot call a class as a function");}else{++cov_19cqw5u33c.b[6][1];}}var Server=(++cov_19cqw5u33c.s[22],function(){++cov_19cqw5u33c.f[5];function Server(){++cov_19cqw5u33c.f[6];++cov_19cqw5u33c.s[23];_classCallCheck(this,Server);}++cov_19cqw5u33c.s[24];_createClass(Server,null,[{key:'getCookie',value:function getCookie(name){++cov_19cqw5u33c.f[7];var cookieValue=(++cov_19cqw5u33c.s[25],null);++cov_19cqw5u33c.s[26];if((++cov_19cqw5u33c.b[8][0],document.cookie)&&(++cov_19cqw5u33c.b[8][1],document.cookie!=='')){++cov_19cqw5u33c.b[7][0];var cookies=(++cov_19cqw5u33c.s[27],document.cookie.split(';'));++cov_19cqw5u33c.s[28];for(var i=0;i<cookies.length;i+=1){var cookie=(++cov_19cqw5u33c.s[29],cookies[i].trim());// Does this cookie string begin with the name we want?
++cov_19cqw5u33c.s[30];if(cookie.substring(0,name.length+1)===''+name){++cov_19cqw5u33c.b[9][0];++cov_19cqw5u33c.s[31];cookieValue=decodeURIComponent(cookie.substring(name.length+1));++cov_19cqw5u33c.s[32];break;}else{++cov_19cqw5u33c.b[9][1];}}}else{++cov_19cqw5u33c.b[7][1];}++cov_19cqw5u33c.s[33];return cookieValue;}},{key:'sendRequest',value:function sendRequest(path,method,data){++cov_19cqw5u33c.f[8];var useCache=(++cov_19cqw5u33c.s[34],(++cov_19cqw5u33c.b[11][0],arguments.length>3)&&(++cov_19cqw5u33c.b[11][1],arguments[3]!==undefined)?(++cov_19cqw5u33c.b[10][0],arguments[3]):(++cov_19cqw5u33c.b[10][1],false));var url=(++cov_19cqw5u33c.s[35],'/api'+path);var csrftoken=(++cov_19cqw5u33c.s[36],this.getCookie('csrftoken'));var headers=(++cov_19cqw5u33c.s[37],{'content-type':'application/json',Accept:'application/json','X-CSRFToken':csrftoken});var requestData=(++cov_19cqw5u33c.s[38],{headers:headers,method:method,body:data!==null?(++cov_19cqw5u33c.b[12][0],JSON.stringify(data)):(++cov_19cqw5u33c.b[12][1],undefined),credentials:'same-origin'});// noinspection JSUnresolvedFunction
var request=(++cov_19cqw5u33c.s[39],fetch(url,requestData));var promise=(++cov_19cqw5u33c.s[40],request.then(function(response){++cov_19cqw5u33c.f[9];++cov_19cqw5u33c.s[41];// Logger.log("[Server] Calling", url, response);
if((++cov_19cqw5u33c.b[14][0],response.status<200)||(++cov_19cqw5u33c.b[14][1],response.status>399)){++cov_19cqw5u33c.b[13][0];++cov_19cqw5u33c.s[42];throw response;}else{++cov_19cqw5u33c.b[13][1];}++cov_19cqw5u33c.s[43];if(response.status===204){++cov_19cqw5u33c.b[15][0];++cov_19cqw5u33c.s[44];return response;}else{++cov_19cqw5u33c.b[15][1];}++cov_19cqw5u33c.s[45];return response.json();}));++cov_19cqw5u33c.s[46];return useCache?(++cov_19cqw5u33c.b[16][0],promise.then(function(response){++cov_19cqw5u33c.f[10];++cov_19cqw5u33c.s[47];_logger2.default.log('[Server] Response from',url,response);++cov_19cqw5u33c.s[48];_storage2.default.set(path,response);++cov_19cqw5u33c.s[49];return response;})):(++cov_19cqw5u33c.b[16][1],promise.then(function(response){++cov_19cqw5u33c.f[11];++cov_19cqw5u33c.s[50];_logger2.default.log('[Server] Response from',url,response);++cov_19cqw5u33c.s[51];return response;}));}},{key:'get',value:function get(path){++cov_19cqw5u33c.f[12];var useCache=(++cov_19cqw5u33c.s[52],(++cov_19cqw5u33c.b[18][0],arguments.length>1)&&(++cov_19cqw5u33c.b[18][1],arguments[1]!==undefined)?(++cov_19cqw5u33c.b[17][0],arguments[1]):(++cov_19cqw5u33c.b[17][1],true));++cov_19cqw5u33c.s[53];return(++cov_19cqw5u33c.b[20][0],useCache)&&(++cov_19cqw5u33c.b[20][1],_storage2.default.get(path))?(++cov_19cqw5u33c.b[19][0],Promise.resolve(_storage2.default.get(path))):(++cov_19cqw5u33c.b[19][1],this.sendRequest(path,'GET',null,useCache));}},{key:'post',value:function post(path,data){++cov_19cqw5u33c.f[13];++cov_19cqw5u33c.s[54];return this.sendRequest(path,'POST',data);}},{key:'patch',value:function patch(path,data){++cov_19cqw5u33c.f[14];++cov_19cqw5u33c.s[55];return this.sendRequest(path,'PATCH',data);}// noinspection ReservedWordAsName
import React from 'react';
import { Form, Input, Button, Message, Image } from 'semantic-ui-react';
import { browserHistory } from 'react-router';
import Server from '../lib/server';
import Server from '../lib/Server';
export default class LoginForm extends React.Component {
......@@ -35,8 +35,8 @@ export default class LoginForm extends React.Component {
const data = {
type: this.props.type,
email: this.state.email,
password: this.state.password
}
password: this.state.password,
};
Server.post('api/login/', data).then(() => {
browserHistory.push('/home');
}, () => {
......@@ -46,21 +46,21 @@ export default class LoginForm extends React.Component {
render = () => (
<div className="formLogin" >
<Form onSubmit={(e) => this.handleSubmit(e)} error={this.state.errorFlag}>
<Form onSubmit={e => this.handleSubmit(e)} error={this.state.errorFlag}>
<div className="formHeader">
<Image src={`./assets/img/${this.props.imgSrc}`} size={this.props.imgSize} verticalAlign="middle" /> <span>{ this.props.header }</span>
</div>
<Form.Group widths="equal">
<Form.Field required>
<label htmlFor="id"> Email </label>
<Input type="text" id="email" icon="user" iconPosition="left" placeholder="email" onChange={(e) => this.handleChange(e, 'email')} required />
<Input type="text" id="email" icon="user" iconPosition="left" placeholder="email" onChange={e => this.handleChange(e, 'email')} required />
</Form.Field>
</Form.Group>
<Form.Group widths="equal">
<Form.Field required>
<label htmlFor="password"> Password </label>
<Input type="password" id="password" icon="key" iconPosition="left" placeholder="password" onChange={(e) => this.handleChange(e, 'password')} required />
<Input type="password" id="password" icon="key" iconPosition="left" placeholder="password" onChange={e => this.handleChange(e, 'password')} required />
</Form.Field>
</Form.Group>
......
import React from 'react';
import { Menu, Image } from 'semantic-ui-react';
import { Link } from 'react-router';
import Server from './../lib/server';
import Server from '../lib/Server';
export default class TopMenu extends React.Component {
state = { activeItem: 'home' };
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment