From bc9c882ea919ea4eae596ae6b32786d4cf828009 Mon Sep 17 00:00:00 2001 From: hyoder Date: Wed, 21 Sep 2022 20:58:12 -0400 Subject: [PATCH 01/92] init commit --- .DS_Store | Bin 0 -> 6148 bytes .env | 6 +++ package.json | 11 +++++ public/.DS_Store | Bin 0 -> 8196 bytes public/css/style.css | 57 ++++++++++++++++++++++++ public/cursors/.DS_Store | Bin 0 -> 6148 bytes public/cursors/cursor0.png | Bin 0 -> 6655 bytes public/cursors/cursor1.png | Bin 0 -> 5859 bytes public/cursors/cursor2.png | Bin 0 -> 6469 bytes public/cursors/cursor3.png | Bin 0 -> 6739 bytes public/cursors/cursor4.png | Bin 0 -> 6669 bytes public/index.html | 13 ++++++ public/js/scripts.js | 87 +++++++++++++++++++++++++++++++++++++ public/main.html | 33 ++++++++++++++ server.improved.js | 57 ++++++++++++++++++++++++ server.js | 56 ++++++++++++++++++++++++ 16 files changed, 320 insertions(+) create mode 100644 .DS_Store create mode 100644 .env create mode 100644 package.json create mode 100644 public/.DS_Store create mode 100644 public/css/style.css create mode 100644 public/cursors/.DS_Store create mode 100644 public/cursors/cursor0.png create mode 100644 public/cursors/cursor1.png create mode 100644 public/cursors/cursor2.png create mode 100644 public/cursors/cursor3.png create mode 100644 public/cursors/cursor4.png create mode 100644 public/index.html create mode 100644 public/js/scripts.js create mode 100644 public/main.html create mode 100644 server.improved.js create mode 100644 server.js diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..b58b51eb1bcce3b292f0b283b09be84d2d433f4f GIT binary patch literal 6148 zcmeHKI|>3Z5S>vG!DdU#T)`Uz(Gz$9Q5#`FLF~8kTprCgpF&yfv{2r_^uvY(4IA~Jy+%GHLx*}i$t1{qNx9A_M4w?FUN?eW<5vR?;`JC>7NWGn3>-!^De zfC^9nDnJFOz{eHH5<8iG{A3;e&iX;6Vd)od{|=!lohtBGA;&_%QP(7ai*Ls7pS=NC^Gt$`e=02O#vU>M8B>i-J< zrvHB?aYY5Fz+Wk#qvd+Jz>~7J_8w=ow!k-V%eleLFn0c7o_SK_6`Nzf VCU${NN8IT^{tTEdG%E0I1@0mY6@&l) literal 0 HcmV?d00001 diff --git a/.env b/.env new file mode 100644 index 000000000..03dd02b04 --- /dev/null +++ b/.env @@ -0,0 +1,6 @@ +MONGODB_USER = generic +MONGODB_PASS = freeaccess +MONGODB_HOST = "a3.1joplnl.mongodb.net/" + +GITHUB_CLIENT_ID = "" +GITHUB_CLIENT_SECRET = "" \ No newline at end of file diff --git a/package.json b/package.json new file mode 100644 index 000000000..3949e9264 --- /dev/null +++ b/package.json @@ -0,0 +1,11 @@ +{ + "title": "", + "genre": "", + "year": "", + "scripts": { + "start": "node server.improved.js" + }, + "dependencies": { + "mime": "^2.4.4" + } +} diff --git a/public/.DS_Store b/public/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..f312889a251bc796a0103ba6b27decb8a5d42193 GIT binary patch literal 8196 zcmeHMYitx%6h3EK=)IK36nPZJwF?DOOOZZ+@)EY~f)uGdwr`MSc4wd?)0wg}yNeP? z6Ezw^Vto8mgC_nkhG?P*G0|VusELmNAsUS_{!tSX|Mu4TjN)0{1=UAyH#`nWyp zxKBvmFnmA2oJqc(CBA|jo#2&ytSOashesx8PS)@W9n$Zzijv=-m;C0uQtR#OA4sce z-ZKxFw(eU6GpYNgmsaO_6oSsI>+H*!1#-PF>)QEYhi0m>x}D9Fve{-Wu* zz8DR9ZqDxr6#Ff*6|%HCU)b**@h#W!dd-|il=F+T7si&aTHUyQ^Y-MfuKic%%$=w5 z`FufN!Sbw(ZT1u`!yg*Zy{zdNmUC>7BI@|oQOnHnDopckM;|t?s*4s^FIlQ-leJ5$ z^yf3yiM-`MsMazj_o&g9arG^B$RG#0TtlpA1T$KVwvw@fLf(-xsh472r`2;+XWbq- zBbQji*K*b4-N)(JrD-!?$5ey&*m}marKpu}V(PuTuOK~^!mWH8tHK7}PscV){&-T{ zrgbp&19n*Ky+`-_y(6YW+Y9e@)M(m(khd9zX^<1uix#WeZfy@!FS9{!NY9yjiv-7# zd>>=M;gMXdw8OA`cYLy2OsbYsun6gN3=;6HHc=-b6a=+4(I`1p+-Xao0k*+T7$oR9 zP=s^vB%Fum;T5%mLCKeTrG-XQlO%jOD2H#9 zB(a_M>}vT>lH`loA}y-s-?m`k9kq39nm24oj3Y;4tpu-$unmxU9lisk28TNtVlsbt ztcRd%o}4a?)CvJwc2#KC#Cc4eL135cij~C9B%n+7&iYtPRVcqCd)L|+SIa1ScwpO7 zPb`K^>qgGia>^q)xAksfL8P|i+uCU*kriw@d`^qb3-Btu4wqnz(0L8Mgm2&{_yvB) zazf)GtR_U>jxj=H9oFM&Y{2!{ikomV;WLRlaTj*tZcJeh_F+E`5IPMs@hG}@f)MHx zM$h0VK8%mxqj(;l!l&^Wd^W)9%MxYd*y}8zPEverD)xrmWHP*%n6iAC^^P&tb|Wq0 zZ)lAS{nd3)NaY;cb&k;vB0m&(;QCvWWH(bQlRvgv)c-rC|Neh7xfK1@C<0Lg{$T{L zJef+ilTqo?pKLE`?KnM0=n+lmjY=ArP#2WrM1yji==eVjX&fh2VUq~ysH7yJ_OE{k U2>)`7?*HiizrGy2weJ5v0q{j`GXMYp literal 0 HcmV?d00001 diff --git a/public/css/style.css b/public/css/style.css new file mode 100644 index 000000000..cb8aa588f --- /dev/null +++ b/public/css/style.css @@ -0,0 +1,57 @@ +* { animation: cursor-change 500ms infinite; } +body { + font-family: 'Rammetto One', cursive; + background: #ABCDEF; + animation: shadow-change 100ms infinite; } +h2 {animation: slider 8000ms infinite; } +h3 { + font: 1.2em 'Montserrat', cursive; + animation: fx-3d 1000ms infinite; } +table { + background: linear-gradient(#FFFD46, #FC7DB0, #FFFD46); + background-size: 200% 200%; + animation: gradient 2000ms infinite; + border: 2px solid; + border-collapse: collapse; + text-shadow: 0px 0px 0px; + text-align: center; } +th { + font-family: Arial, cursive; + font-size: 20px; + height: 50px; + background: linear-gradient(#FC7DB0, #FFFD46, #FC7DB0); + background-size: 200% 200%; + animation: gradient 2000ms infinite; + border: 2px solid; } +th:nth-child(1) { width: 450px; } +th:nth-child(2) { width: 120px; } +th:nth-child(3) { width: 060px; } +th:nth-child(4) { width: 100px; } +th:nth-child(5) { width: 080px; } +td { + border: 2px solid; + font: 1em 'Montserrat', cursive; } +button { + font: 1em 'Montserrat', cursive; + animation: button 1000ms infinite } +@keyframes shadow-change { + from{ text-shadow: 5px 15px 1px #FFFFFF; } + to{ text-shadow: 5px 15px 8px #FFFFFF; } } +@keyframes slider { + 0%, 100% { transform: translateX(0%); } + 50% { transform: translateX(60%); } } +@keyframes fx-3d { + 0%, 100% { text-shadow: 4px 4px 1px #FF0000; } + 50% { text-shadow: -4px -4px 1px #0000FF;} } +@keyframes gradient { + 0%, 100% { background-position: 0% 0%; } + 50% { background-position: 0% 100%; } } +@keyframes button { + 00% { color: #000000; transform: scale(1.0); text-shadow: 0px 00px 0px #000000; } + 40% { color: #FF0000; transform: scale(1.2); text-shadow: 3px 10px 5px #000000; } } +@keyframes cursor-change { + 000% { cursor: url('../cursors/cursor0.png'), auto; } + 025% { cursor: url('../cursors/cursor1.png'), auto; } + 050% { cursor: url('../cursors/cursor2.png'), auto; } + 075% { cursor: url('../cursors/cursor3.png'), auto; } + 100% { cursor: url('../cursors/cursor4.png'), auto; } } \ No newline at end of file diff --git a/public/cursors/.DS_Store b/public/cursors/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..5008ddfcf53c02e82d7eee2e57c38e5672ef89f6 GIT binary patch literal 6148 zcmeH~Jr2S!425mzP>H1@V-^m;4Wg<&0T*E43hX&L&p$$qDprKhvt+--jT7}7np#A3 zem<@ulZcFPQ@L2!n>{z**++&mCkOWA81W14cNZlEfg7;MkzE(HCqgga^y>{tEnwC%0;vJ&^%eQ zLs35+`xjp>T0F!1ZL7JgOkPZR; z@V)oF_kH)SbN4>`{Lb%p_E~4Geb>FQ+L}tl1dj*+006Oyvb^qth5c=KI1kSc4sNRt z2E#*FNe)moNw@#d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ehc2ylw$2`u(0;TNz8|l=q1?;X^U$Tum0Zrd zI51OvQc;C(>1c#rO~@bZZkY2gx7{e$A4TngrWeqoLJ8jR7ha{9*4#sAXO|K-HmY>W z^~Y%bcA11qxAu|v@X$$WCDR1NnzQS1X)F)RtMJndpNzNPi1&MHxulc*2y)saAY?ju zgo7(I!X)MM#ug6~oT1Pv<3fykFAFMmBbFw%rhYZ?`Q^4j_llY5z| z0E)Yj1$HKv61{FN9}kL{H_u-_yD;eRsd7#w&pU!YPbX0nQ zvVLu8RhaojGMB$H6a$n3H0MkI_PO;u{n@S8&nq!H72UINt0(t@{s;tVNERE2so!wE zyeY7-_XBTzys6-Ln-6^~cW8(+8wLuF7V;p7#K%eDIgs3WG+YA;^~#Ft+mg0l311J4 zXyJ=Ul{p$-?RY=;`d7t5f{$>i51cj2h|=EEZYHhQs(Sg25$?DN zJYU9KqoQj1IFSMi5+0w;Dp)=CQv1?m-VNuYn`#<0V0WLXyXOzKV0N^YO4Ek*zV&{8 zHhpZqMPtzc*>nR~`e|YeVwztcgH(V6ZcHA4@HvIO$al=AO#X~#a6E_g4+b2zQWDBF zz>=ls20jK&#r``Q+5jW)jE?N zUk`S$o*E@;Du)SrbuIR+gEy5%NCcQwIz*QO`yLR6Vvgbot`hdQs5?8(hWp9 z`Tn4?{^6!KI&qQ~xnoZk9=%Z<&pb96=(sLviRseYdP^Q`=27kA>C$HOr;TN@(C2dK zG5VUC+;>=f>dfvAP2t2qC_{{~MImQB6l!@aQg6ymNtACgwV?AV$#XA00hAs$)4soO zU3rB^`OM_H0ozsbW&INvekc-?)@IZn(=h1o7xx6F&_CFZXSAlmY6sT-{!UR*(3G!| HgNOYezL_7c literal 0 HcmV?d00001 diff --git a/public/cursors/cursor1.png b/public/cursors/cursor1.png new file mode 100644 index 0000000000000000000000000000000000000000..184e2298e225b41dff6d325fe7d7c9b3328094bb GIT binary patch literal 5859 zcmY*d1yodB*B)S~0c7ZgAth%3X^@hTMp{6aA*EyJ4kkiP~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C#t0mOF9DfBx&*&0llBVaxf%hZ5K z+xfQlr*6g%g#%!Y7Z9;GSKPDkIT6&TUb9-wu1C$~SC?O??2jBFrHe5Ixt9jfiJ%oT zfpBcNNSCgwl{K|baKxh&ZMx?2rwQ0E#sa6vAmPSc4P+5K<>!R?+H@h0f(@uwi_q*i zrQ#h&J;ya|$fb?Xp%eZ1w%$dAf!=4^#X&*5gKZunbLja`=l9Jvd~~+@d~J?T+lSm= zxzjK2WufgXUvyNco0@M{nf>dxSrX zroBX$g*l#-jir-SVCk%??3t|l=}u_T8&Q$22Def_6wzHdFD=+S2;PFH{@#EC*V$4C~!+ZHb2{~dSO(*s)aU#50EEEBwDQV#u zz?2jTklofmSKR;Nna7C^XV#E8|&(Cb_)%!1b znAX?9xU0x#-w|h^4@TfdVk7#@T}mwrX=PMd0y|jZ4P)uhFxi2^>JM*K&)edyi#A9F|Gwc!eOT^zyQUuXQimAwq(&eKH7+{)wD(r9iwG=RwXUPLBl8I2 z9kEgvby~GtYyH{8H`uGt0JR#Vw|zMhi}`7@`?qiJA=loyX|M%O&+19vBl1XTshqYL z>DF;`qgzHva_#tjo1dKvI%Kg#=D$y9oF?TVcaCl9F8f6&_ z3`p2QMDO^^;zY#-d967U6lO~Q32Lu+%}zK(?%!$_sCdHSzD=E5gzeB D00GEN literal 0 HcmV?d00001 diff --git a/public/cursors/cursor2.png b/public/cursors/cursor2.png new file mode 100644 index 0000000000000000000000000000000000000000..c3d1a0b9da90e3876af5100579feba7592e10eb8 GIT binary patch literal 6469 zcmY*ecQ{<%)*hYF+aP-Hoy6#!VRX?uqet}K`zX=7AP9o!H90I2`?007IA1prWrkp3GjLjF%w zx(MaJ{$HYQf^*H2h@pe7fv15QRMh(QD;`Um*H$nd-&d}G2>@|l(I@v6%+r$2_m#7Y zhp4Xv!#@nsC;uK0H2xJg?pDc=^F#FfX3~uYdse6NB5s&&AWym)pgI@n0hUt0NEd zuy%KF^>ldcLibnK((1LBrvwAT-$ehp{#B=^gYADax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#=RM2adR;2HheOMm)t2kb33>VHJ8l&~ zxSY|ad8eUy54$iw*g#cdF{lkKUA#*f7ES2j8LP*v300of+9PC{y^UP3>d+3pzWJzg zSj%;Jz#Nd>Gk|zMP}Ajbbnmp4_)aO=0F?lnwyZUe&xc+wR%NTVS*-h(;0Ny&w9K?TY(u(}cP!G~vJyoW-Rn44 zDeitd(6sOVyvjyBVRRd%_)MdpN2P%Hyr}f~Spu31&CP?Bv3GTp2wU^-iYio*s_--4 zuyLR2WC-pnC-VwZ8sXf_uVfw*yQQ}bUkbt8JyCH8v%QaTRI`6^t1lqhBUQaFUKOx7 zwZ#`<2#yz5=XEG+LhkXq{v;Bf`uYca7yMJ@;N^H$7PkvvVw^+&6E!){5)d^H z{4BQ@|2~9nzWl&|D&(0e0e@qls62=~)8z?%wII->Ai0%vwc6sSYVOfSTxK^dF=Fxpz1rZ*b zTh$$^hILO2;FR6SMm%wKy=TOc^3ph_;Bsp*K`~>WYbmB*Z#P66B zavI`)j6^I5JGwR73&(H3+R3Il%G|#vch;iHE<+gjC~&fi8nd_7MsK)CyyUDAdt7)0 zF{uFUb+`Wz0p5I7X9jj+q{{MQ8Tk|&`w#;IoG*--7rQ39&zH@ba-CLA%JVldqv!7$ zE_Gu4-F>chbMvQhto>e&RMn5Ij1(=0BD5?GvW702r%&9B%XRJB>#Vky7L7E0rLlKi zryC9!9YJ?b-aCXaQfcBQbI$I*yTKN(ekh#R!ySe8n#X~+PdYnm9u~G2ock9=_%@U3@n43 z`jRErESBhvQjm@E1)<`N)>y>q_GbyDlMTSS#DNIgep%TcvL-*~J=D1h;Vb_FW(J%@ zMlgYk& + + + + log in now with github or else + + +
+

log in or else !

+ log in with github or else now +
+ + \ No newline at end of file diff --git a/public/js/scripts.js b/public/js/scripts.js new file mode 100644 index 000000000..30fe1c688 --- /dev/null +++ b/public/js/scripts.js @@ -0,0 +1,87 @@ +let tempID = null, tempElement = null; +function dothething() +{ + fetch('/data', { method: 'GET', headers: { "Content-Type": "application/json" } }) + .then( response => response.json() ) + .then( json => builder( json[ 0 ].entries )); +}; +function builder ( json ) +{ + const tbl = document.getElementById( 'datatable' ); + tbl.innerHTML = 'titlegenreyeardirected by Todd Phillips?edit?delete?'; + json.forEach(entry => + { + let newRow = ''; + newRow += '' + entry.title.toString().toUpperCase() + ''; + newRow += '' + entry.genre.toString().toUpperCase() + ''; + newRow += '' + entry.year + ''; + newRow += '' + toddcheck( entry.title, entry.year ) + ''; + newRow += ''; + newRow += ''; + datatable.innerHTML += newRow; + }); +}; +function submitter( e ) +{ + const title = document.getElementById('title'), + genre = document.getElementById('genre'), + year = document.getElementById('year'), + json = { title: title.value, genre: genre.value, year: year.value }, + body = JSON.stringify(json); + fetch('/submit', { method: 'POST', headers: { "Content-Type": "application/json" }, body }) + .then( response => response.json()) + .then(dothething()); + return false; +}; +function deleter( id ) +{ + const json = { id: x.id }, + body = JSON.stringify( json ); + fetch( '/delete', { method: 'POST', headers: { "Content-Type": "application/json" }, body } ) + .then( response => { response.json() }) + .then( dothething() ); + return false; +}; +function updater( id, title, genre, year ) +{ + if( tempElement != null && tempID != null ) { updatercanceller( tempID ); } + tempID = id; + tempElement = document.getElementById('row-'+id); + let newRow = '' + id + ''; + newRow += '' + newRow += '' + newRow += '' + newRow += ''; + tempElement.innerHTML = newRow; +}; +function updatercanceller( id ) +{ + let title = document.getElementById( 'title-${tempID}' ).value, + genre = document.getElementById( 'genre-${tempID}' ).value, + year = document.getElementById( 'year-${tempID}' ).value, + newRow = '' + tempID + ''; + newRow += '' + title + ''; + newRow += '' + genre + ''; + newRow += '' + year + ''; + newRow += '' + toddCheck(title, genre) + '<\th>'; + newRow += ''; + newRow += ''; + tempElement.innerHTML = newRow; + tempElement = null; + tempID = null; +}; +function updatersubmitter( id ) +{ + const json = { id: id, + title: document.getElementById('title-'+id).value, + genre: document.getElementById('genre-'+id).value, + year: document.getElementById( 'year-'+id).value + }, + body = JSON.stringify(json); + fetch( '/update', { method: 'POST', headers: { "Content-Type": "application/json" }, body }) + .then( response => response.json() ) + .then( dothething() ); + tempID = null; + tempElement = null; +} \ No newline at end of file diff --git a/public/main.html b/public/main.html new file mode 100644 index 000000000..e35f02ffb --- /dev/null +++ b/public/main.html @@ -0,0 +1,33 @@ + + + + cs4241 a2 + + + + + + + + +
+
+

want to know if a movie is directed by todd phillips?

+

you're in luck

+

disclaimer: todd phillips is not very good at making movies

+
+
+ +
+
+ +
+
+ +

+
+
+

data:

+
+ + diff --git a/server.improved.js b/server.improved.js new file mode 100644 index 000000000..191a2ee6b --- /dev/null +++ b/server.improved.js @@ -0,0 +1,57 @@ +const http = require( 'http' ), fs = require( 'fs' ), mime = require( 'mime' ), dir = 'public/', port = 3000; +const {MongoClient} = require( 'mongodb' ); +let appdata = [ { 'title': 'Halloween', 'genre': 'horror', 'year': 1978 }, + { 'title': 'War Dogs', 'genre': 'comedy', 'year': 2016 }, + { 'title': 'A Nightmare On Elm Street 3: Dream Warriors', 'genre': 'horror', 'year': 1987 }, + { 'title': 'Alvin and the Chipmunks: The Road Chip', 'genre': 'family', 'year': 2015 }, + { 'title': 'Old School', 'genre': 'comedy', 'year': 2003 } ]; +const server = http.createServer( function( request, response ) { + if( request.method === 'GET' ) { handleGet( request, response ); } + else if( request.method === 'POST' ) { handlePost( request, response ); } + else if( request.method === 'DELETE' ) { handleDelete( request, response ); } } ); +const handleGet = function( request, response ) { + const filename = dir + request.url.slice( 1 ); + if ( request.url === '/' ) { sendFile( response, 'public/index.html' ); } + else if ( request.url === '/init' ) { + response.writeHead( 200, 'OK', { 'Content-Type': 'application/json' }); + response.end( JSON.stringify( appdata ) ); } + else { sendFile( response, filename ); } }; +const handlePost = function( request, response ) { + let dataString = ''; + request.on( 'data', function( data ) { dataString += data; } ); + request.on( 'end', function() { + appdata.push( JSON.parse( dataString ) ); + response.writeHead( 200, "OK", {'Content-Type': 'application/json' } ); + response.end( JSON.stringify( appdata ) ); } ); }; +const handleDelete = function( request, response ) { + let dataString = ''; + request.on( 'data', function( data ) { dataString += data; } ); + request.on( 'end', function() { + let tobedeleted = JSON.parse( dataString ).title; + appdata = appdata.filter( entry => entry.title !== tobedeleted ); + response.writeHead( 200, "OK", {"Content-Type": 'application/json' } ); + console.log( appdata ); + response.end( JSON.stringify( appdata ) ); } ); }; +const sendFile = function( response, filename ) { + const type = mime.getType( filename ); + fs.readFile( filename, function( err, content ) { + // if the error = null, then we've loaded the file successfully + if( err === null ) { + // status code: https://httpstatuses.com + response.writeHeader( 200, { 'Content-Type': type }); + response.end( content ); } + else { + // file not found, error code 404 + response.writeHeader( 404 ); + response.end( '404 Error: File Not Found' ); } } ); }; +server.listen( process.env.PORT || port ); +async function main() { + const uri = "mongodb+srv://hyoder1440:yRGumjL3UF@a3.1joplnl.mongodb.net/?retryWrites=true&w=majority"; + const client = new MongoClient( uri ); + try { + await client.connect(); + await listDatabases( client ); } + catch ( e ) { console.error( e ); } + finally { await client.close(); } +} +main().catch(console.error); \ No newline at end of file diff --git a/server.js b/server.js new file mode 100644 index 000000000..1f22328b5 --- /dev/null +++ b/server.js @@ -0,0 +1,56 @@ +require('dotenv').config(); +const express = require('express'), + mongodb = require('mongodb'), + uri = `mongodb+srv://${process.env.MONGODB_USER}:${process.env.MONGODB_PASS}@${process.env.MONGODB_HOST}`, + client = new mongodb.MongoClient(uri, {useNewUrlParser: true, useUnifiedTopology: true}), + passport = require('passport'), + GitHubStrategy = require('passport-github2').Strategy, + app = express(); +let collection = undefined; +client.connect().then( () => { collection = client.db( 'data' ).collection( 'movies' ) } ); +passport.use(new GitHubStrategy({ + clientID: process.env.GITHUB_CLIENT_ID, + clientSecret: process.env.GITHUB_CLIENT_SECRET, + callbackURL: '/auth/github/callback' }, + function(accessToken, refreshToken, profile, done) + { + User.findOrCreate({ githubId: profile.id }, + function(err, user) { return done(err, user); }); + } +)); +app.get('/login', ( req, res ) => +{ + res.sendFile('index.html', { user: req.user, root: Path2D.join(__dirname, 'public')}); +}); +app.get('/auth/github', passport.authenticate('github', { scope: [ 'user:email' ] })); +app.get('/auth/github/callback', passport.authenticate('github', { failureRedirect: '/login' }), function(req, res) { res.redirect('/main.html'); }); +app.get('/data', checkAuth, ( req, res ) => +{ + collection.find({ id:mongodb.ObjectId() }) + .project({ id: 0, items: 1 }).toArray() + .then( result => res.json( result ) ); +}); +app.post('/submit', checkAuth, ( req, res ) => +{ + let body = { id: mongodb.ObjectId(), title: req.body.title, genre: req.body.genre, year: req.body.year }; + collection.updateOne({ id: mongodb.ObjectId() }, + { $push: { items: body } }) + .then( result => res.json( result ) ); +}); +app.post('/delete', checkAuth, ( req, res ) => +{ + collection.updateOne({ id: mongodb.ObjectId() }, + { $pull: { items: { id: mongodb.ObjectId( req.body.id ) } } }) + .then( result => res.json( result ) ); +}); +app.post('/update', checkAuth, ( req, res ) => +{ + let changer = { id: mongodb.ObjectId( req.body.id ), title: req.body.title, genre: req.body.genre, year: req.body.year }; + collection.updateOne({ id: mongodb.ObjectId(), "items.id":mongodb.ObjectId( req.body.id ) }, + { $set: "items.$", changer }) + .then( result => res.json( result ) ); +}); +function checkAuth( req, res, next ) { + if ( allowed.includes(req.path) || req.isAuthenticated()) { return next(); } + res.redirect( '/login' ); }; +app.listen( process.env.PORT || 3000 ) \ No newline at end of file From bd09a62d1d8cb8252b7b69adb4b96887e3cdbe3e Mon Sep 17 00:00:00 2001 From: hyoder Date: Wed, 21 Sep 2022 21:02:21 -0400 Subject: [PATCH 02/92] commit 2: github pls --- .env | 4 ++-- server.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.env b/.env index 03dd02b04..f3a322657 100644 --- a/.env +++ b/.env @@ -2,5 +2,5 @@ MONGODB_USER = generic MONGODB_PASS = freeaccess MONGODB_HOST = "a3.1joplnl.mongodb.net/" -GITHUB_CLIENT_ID = "" -GITHUB_CLIENT_SECRET = "" \ No newline at end of file +GITHUB_CLIENT_ID = "5d83b71ec160d51c1b6f" +GITHUB_CLIENT_SECRET = "4cbb4b0394c1a9966ea431b3ce5cbe86ebcf2bde" \ No newline at end of file diff --git a/server.js b/server.js index 1f22328b5..41aca6341 100644 --- a/server.js +++ b/server.js @@ -11,7 +11,7 @@ client.connect().then( () => { collection = client.db( 'data' ).collection( 'mov passport.use(new GitHubStrategy({ clientID: process.env.GITHUB_CLIENT_ID, clientSecret: process.env.GITHUB_CLIENT_SECRET, - callbackURL: '/auth/github/callback' }, + callbackURL: 'https://a3-hyoder.herokuapp.com/auth/github/callback' }, function(accessToken, refreshToken, profile, done) { User.findOrCreate({ githubId: profile.id }, From 2f42644cd765ce35162582b6342487c598e2c0cb Mon Sep 17 00:00:00 2001 From: hyoder Date: Wed, 21 Sep 2022 21:04:55 -0400 Subject: [PATCH 03/92] commit 3: whoops --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 3949e9264..76895f1b4 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "genre": "", "year": "", "scripts": { - "start": "node server.improved.js" + "start": "node server.js" }, "dependencies": { "mime": "^2.4.4" From ca6684c857333889a9efd5647e5016e04a7eab15 Mon Sep 17 00:00:00 2001 From: hyoder Date: Wed, 21 Sep 2022 21:14:56 -0400 Subject: [PATCH 04/92] commit again? i guess --- package.json | 10 ++++---- server.improved.js | 57 ---------------------------------------------- 2 files changed, 6 insertions(+), 61 deletions(-) delete mode 100644 server.improved.js diff --git a/package.json b/package.json index 76895f1b4..a86def4c3 100644 --- a/package.json +++ b/package.json @@ -2,10 +2,12 @@ "title": "", "genre": "", "year": "", - "scripts": { - "start": "node server.js" - }, + "scripts": { "start": "node server.js" }, "dependencies": { - "mime": "^2.4.4" + "express": "4.18.1", + "mongodb": "4.10.0", + "passport": "0.6.0", + "passport-github2": "0.1.12", + "dotenv": "16.0.2" } } diff --git a/server.improved.js b/server.improved.js deleted file mode 100644 index 191a2ee6b..000000000 --- a/server.improved.js +++ /dev/null @@ -1,57 +0,0 @@ -const http = require( 'http' ), fs = require( 'fs' ), mime = require( 'mime' ), dir = 'public/', port = 3000; -const {MongoClient} = require( 'mongodb' ); -let appdata = [ { 'title': 'Halloween', 'genre': 'horror', 'year': 1978 }, - { 'title': 'War Dogs', 'genre': 'comedy', 'year': 2016 }, - { 'title': 'A Nightmare On Elm Street 3: Dream Warriors', 'genre': 'horror', 'year': 1987 }, - { 'title': 'Alvin and the Chipmunks: The Road Chip', 'genre': 'family', 'year': 2015 }, - { 'title': 'Old School', 'genre': 'comedy', 'year': 2003 } ]; -const server = http.createServer( function( request, response ) { - if( request.method === 'GET' ) { handleGet( request, response ); } - else if( request.method === 'POST' ) { handlePost( request, response ); } - else if( request.method === 'DELETE' ) { handleDelete( request, response ); } } ); -const handleGet = function( request, response ) { - const filename = dir + request.url.slice( 1 ); - if ( request.url === '/' ) { sendFile( response, 'public/index.html' ); } - else if ( request.url === '/init' ) { - response.writeHead( 200, 'OK', { 'Content-Type': 'application/json' }); - response.end( JSON.stringify( appdata ) ); } - else { sendFile( response, filename ); } }; -const handlePost = function( request, response ) { - let dataString = ''; - request.on( 'data', function( data ) { dataString += data; } ); - request.on( 'end', function() { - appdata.push( JSON.parse( dataString ) ); - response.writeHead( 200, "OK", {'Content-Type': 'application/json' } ); - response.end( JSON.stringify( appdata ) ); } ); }; -const handleDelete = function( request, response ) { - let dataString = ''; - request.on( 'data', function( data ) { dataString += data; } ); - request.on( 'end', function() { - let tobedeleted = JSON.parse( dataString ).title; - appdata = appdata.filter( entry => entry.title !== tobedeleted ); - response.writeHead( 200, "OK", {"Content-Type": 'application/json' } ); - console.log( appdata ); - response.end( JSON.stringify( appdata ) ); } ); }; -const sendFile = function( response, filename ) { - const type = mime.getType( filename ); - fs.readFile( filename, function( err, content ) { - // if the error = null, then we've loaded the file successfully - if( err === null ) { - // status code: https://httpstatuses.com - response.writeHeader( 200, { 'Content-Type': type }); - response.end( content ); } - else { - // file not found, error code 404 - response.writeHeader( 404 ); - response.end( '404 Error: File Not Found' ); } } ); }; -server.listen( process.env.PORT || port ); -async function main() { - const uri = "mongodb+srv://hyoder1440:yRGumjL3UF@a3.1joplnl.mongodb.net/?retryWrites=true&w=majority"; - const client = new MongoClient( uri ); - try { - await client.connect(); - await listDatabases( client ); } - catch ( e ) { console.error( e ); } - finally { await client.close(); } -} -main().catch(console.error); \ No newline at end of file From 1260f5180ac98e369f27b64ac6ab43a4e3f05a69 Mon Sep 17 00:00:00 2001 From: hyoder Date: Wed, 21 Sep 2022 21:23:33 -0400 Subject: [PATCH 05/92] commit 4: praying --- procfile | 1 + server.js | 1 + 2 files changed, 2 insertions(+) create mode 100644 procfile diff --git a/procfile b/procfile new file mode 100644 index 000000000..6f86b16c8 --- /dev/null +++ b/procfile @@ -0,0 +1 @@ +web: node server.js \ No newline at end of file diff --git a/server.js b/server.js index 41aca6341..457599891 100644 --- a/server.js +++ b/server.js @@ -18,6 +18,7 @@ passport.use(new GitHubStrategy({ function(err, user) { return done(err, user); }); } )); +app.get('/', ( req, res ) => { res.redirect('/index.html') }); app.get('/login', ( req, res ) => { res.sendFile('index.html', { user: req.user, root: Path2D.join(__dirname, 'public')}); From 9f11a8ac779cf6801b2bfe42f886389c983f9638 Mon Sep 17 00:00:00 2001 From: hyoder Date: Wed, 21 Sep 2022 22:10:45 -0400 Subject: [PATCH 06/92] commit 5: maybe --- public/js/scripts.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/public/js/scripts.js b/public/js/scripts.js index 30fe1c688..8696a5e03 100644 --- a/public/js/scripts.js +++ b/public/js/scripts.js @@ -84,4 +84,16 @@ function updatersubmitter( id ) .then( dothething() ); tempID = null; tempElement = null; -} \ No newline at end of file +} +const toddcheck = function( title, year ) { + const years = [ 2000, 2003, 2004, 2006, 2009, 2010, 2011, 2013, 2016, 2019 ]; + const titles = [ 'ROAD TRIP', 'OLD SCHOOL', 'STARSKY & HUTCH', 'SCHOOL FOR SCOUNDRELS', 'THE HANGOVER', + 'DUE DATE', 'THE HANGOVER PART II', 'THE HANGOVER III', 'WAR DOGS', 'JOKER' ]; + const numFilms = 10; + title = title.toString().toUpperCase(); + for ( let i = 0 ; i < numFilms ; i++ ) { if( year == years[ i ] && title == titles[ i ] ) { return 'YES!'; } } + return 'NO!'; }; +window.onload = function() { + const submit = document.getElementById( 'submit' ); + submit.onclick = submitter; + dothething(); }; \ No newline at end of file From 15a258dfc55086df84c8e8d38d0d8d52a697a818 Mon Sep 17 00:00:00 2001 From: hyoder Date: Wed, 21 Sep 2022 22:18:42 -0400 Subject: [PATCH 07/92] commit lol --- server.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/server.js b/server.js index 457599891..b117ef3ba 100644 --- a/server.js +++ b/server.js @@ -8,6 +8,19 @@ const express = require('express'), app = express(); let collection = undefined; client.connect().then( () => { collection = client.db( 'data' ).collection( 'movies' ) } ); +app.use( ( req, res, next ) => +{ + if( collection !== null ) { next(); } + else { res.status( 503 ).send(); } +}); +app.use( express.static( 'public' ) ); +app.use( haltOnTimeout ); +app.use( express.static( 'views' ) ); +app.use( haltOnTimeout ); +app.use( express.json() ); +app.use( haltOnTimeout ); +app.use( passport.initialize() ); +app.use( passport.session() ); passport.use(new GitHubStrategy({ clientID: process.env.GITHUB_CLIENT_ID, clientSecret: process.env.GITHUB_CLIENT_SECRET, From 0b4d998cea9d5fddb8ed49c5691d4d9981f887e8 Mon Sep 17 00:00:00 2001 From: hyoder Date: Sun, 25 Sep 2022 23:49:10 -0400 Subject: [PATCH 08/92] commit reup time lesgo --- public/css/style.css | 57 ------------------ public/cursors/.DS_Store | Bin 6148 -> 0 bytes public/cursors/cursor0.png | Bin 6655 -> 0 bytes public/cursors/cursor1.png | Bin 5859 -> 0 bytes public/cursors/cursor2.png | Bin 6469 -> 0 bytes public/cursors/cursor3.png | Bin 6739 -> 0 bytes public/cursors/cursor4.png | Bin 6669 -> 0 bytes public/{js => }/scripts.js | 0 public/style.css | 0 public/{index.html => views/index.handlebars} | 1 + public/{main.html => views/main.handlebars} | 2 +- server.js | 36 +++++------ 12 files changed, 21 insertions(+), 75 deletions(-) delete mode 100644 public/css/style.css delete mode 100644 public/cursors/.DS_Store delete mode 100644 public/cursors/cursor0.png delete mode 100644 public/cursors/cursor1.png delete mode 100644 public/cursors/cursor2.png delete mode 100644 public/cursors/cursor3.png delete mode 100644 public/cursors/cursor4.png rename public/{js => }/scripts.js (100%) create mode 100644 public/style.css rename public/{index.html => views/index.handlebars} (81%) rename public/{main.html => views/main.handlebars} (97%) diff --git a/public/css/style.css b/public/css/style.css deleted file mode 100644 index cb8aa588f..000000000 --- a/public/css/style.css +++ /dev/null @@ -1,57 +0,0 @@ -* { animation: cursor-change 500ms infinite; } -body { - font-family: 'Rammetto One', cursive; - background: #ABCDEF; - animation: shadow-change 100ms infinite; } -h2 {animation: slider 8000ms infinite; } -h3 { - font: 1.2em 'Montserrat', cursive; - animation: fx-3d 1000ms infinite; } -table { - background: linear-gradient(#FFFD46, #FC7DB0, #FFFD46); - background-size: 200% 200%; - animation: gradient 2000ms infinite; - border: 2px solid; - border-collapse: collapse; - text-shadow: 0px 0px 0px; - text-align: center; } -th { - font-family: Arial, cursive; - font-size: 20px; - height: 50px; - background: linear-gradient(#FC7DB0, #FFFD46, #FC7DB0); - background-size: 200% 200%; - animation: gradient 2000ms infinite; - border: 2px solid; } -th:nth-child(1) { width: 450px; } -th:nth-child(2) { width: 120px; } -th:nth-child(3) { width: 060px; } -th:nth-child(4) { width: 100px; } -th:nth-child(5) { width: 080px; } -td { - border: 2px solid; - font: 1em 'Montserrat', cursive; } -button { - font: 1em 'Montserrat', cursive; - animation: button 1000ms infinite } -@keyframes shadow-change { - from{ text-shadow: 5px 15px 1px #FFFFFF; } - to{ text-shadow: 5px 15px 8px #FFFFFF; } } -@keyframes slider { - 0%, 100% { transform: translateX(0%); } - 50% { transform: translateX(60%); } } -@keyframes fx-3d { - 0%, 100% { text-shadow: 4px 4px 1px #FF0000; } - 50% { text-shadow: -4px -4px 1px #0000FF;} } -@keyframes gradient { - 0%, 100% { background-position: 0% 0%; } - 50% { background-position: 0% 100%; } } -@keyframes button { - 00% { color: #000000; transform: scale(1.0); text-shadow: 0px 00px 0px #000000; } - 40% { color: #FF0000; transform: scale(1.2); text-shadow: 3px 10px 5px #000000; } } -@keyframes cursor-change { - 000% { cursor: url('../cursors/cursor0.png'), auto; } - 025% { cursor: url('../cursors/cursor1.png'), auto; } - 050% { cursor: url('../cursors/cursor2.png'), auto; } - 075% { cursor: url('../cursors/cursor3.png'), auto; } - 100% { cursor: url('../cursors/cursor4.png'), auto; } } \ No newline at end of file diff --git a/public/cursors/.DS_Store b/public/cursors/.DS_Store deleted file mode 100644 index 5008ddfcf53c02e82d7eee2e57c38e5672ef89f6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeH~Jr2S!425mzP>H1@V-^m;4Wg<&0T*E43hX&L&p$$qDprKhvt+--jT7}7np#A3 zem<@ulZcFPQ@L2!n>{z**++&mCkOWA81W14cNZlEfg7;MkzE(HCqgga^y>{tEnwC%0;vJ&^%eQ zLs35+`xjp>T0F!1ZL7JgOkPZR; z@V)oF_kH)SbN4>`{Lb%p_E~4Geb>FQ+L}tl1dj*+006Oyvb^qth5c=KI1kSc4sNRt z2E#*FNe)moNw@#d(MB4p*lK71xF38x044@G0QeX3a08+p09gO>0RZ*~3jhEMF#b1M zfcf81SOM^V{$HSeoMY7kiHU>0v8S#>6Cc9H#R|#i>*V?u0Fd&Pd~ltRo(M)? zCr4)wNndH^e<36v{J&u+GvmJ?p0A{tjWx6xpS!pt8AbW{`S_V-2pAa|rQB_7C3WQ$ z|1FFv7h5GpT@c9VwxwzXw1tcUSp!|YRK|#m^0^;H4?1}J&ID4@Co8R-tJFZLfDDd=DE|7S7(&h%f=hg4+n1%MDxr z0DP??FRSm1acJh3m^0w@dQCv+X?=aU;o{tP*iaQKt0yCVVj_~TCb5Qzjw_V7P7g(| zuB%DZTr)=LtsGgzofyI-+D~f5frrV7azrtDm?+}XtZve{u55;{MlzR!ksHzRJ1~{@v^J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zXyJ=Ul{p$-?RY=;`d7t5f{$>i51cj2h|=EEZYHhQs(Sg25$?DN zJYU9KqoQj1IFSMi5+0w;Dp)=CQv1?m-VNuYn`#<0V0WLXyXOzKV0N^YO4Ek*zV&{8 zHhpZqMPtzc*>nR~`e|YeVwztcgH(V6ZcHA4@HvIO$al=AO#X~#a6E_g4+b2zQWDBF zz>=ls20jK&#r``Q+5jW)jE?N zUk`S$o*E@;Du)SrbuIR+gEy5%NCcQwIz*QO`yLR6Vvgbot`hdQs5?8(hWp9 z`Tn4?{^6!KI&qQ~xnoZk9=%Z<&pb96=(sLviRseYdP^Q`=27kA>C$HOr;TN@(C2dK zG5VUC+;>=f>dfvAP2t2qC_{{~MImQB6l!@aQg6ymNtACgwV?AV$#XA00hAs$)4soO zU3rB^`OM_H0ozsbW&INvekc-?)@IZn(=h1o7xx6F&_CFZXSAlmY6sT-{!UR*(3G!| HgNOYezL_7c diff --git a/public/cursors/cursor1.png b/public/cursors/cursor1.png deleted file mode 100644 index 184e2298e225b41dff6d325fe7d7c9b3328094bb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5859 zcmY*d1yodB*B)S~0c7ZgAth%3X^@hTMp{6aA*EyJ4kkiP~c&y*n%a_aVT$YbzZ* zR_+WIQcqP8P(8-@S>sU6E3L583`fNZt8=!!S0;KM*gchioQVx{yb1p0*G%s3263O%?=!Kx8~^?4kIXL0Cn@UhY3kaO2Pz%VZy=!cL)KbzpEF*Prwz){x6dM zv{bB=ZmQ|Hb~TBLn*@{(mO(uS)-k-jyl~l7ana*2{HJ#I z4peSUO!jz{PYPJgaH@3WpeAYd@M2|ecA!ydEDA|3aX|c}o(OVx0@|a0*Et zHw%!z7DAw^NII=dV8aV`n;?Dp^wyAIiv@q6Kcw*|UAEK%ZMog+6oS=K(RJvv?;bRr zu8+N>_?CQB_l;Dm`~bCBVeAF!ac>T&)Xrl|cDl%gYa=p2_e02XzP;3BCi}{g1^0a1 zZGJD}h?BsXP(uv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?9xU0x#-w|h^4@TfdVk7#@T}mwrX=PMd0y|jZ4P)uhFxi2^>JM*K&)edyi#A9F|Gwc!eOT^zyQUuXQimAwq(&eKH7+{)wD(r9iwG=RwXUPLBl8I2 z9kEgvby~GtYyH{8H`uGt0JR#Vw|zMhi}`7@`?qiJA=loyX|M%O&+19vBl1XTshqYL z>DF;`qgzHva_#tjo1dKvI%Kg#=D$y9oF?TVcaCl9F8f6&_ z3`p2QMDO^^;zY#-d967U6lO~Q32Lu+%}zK(?%!$_sCdHSzD=E5gzeB D00GEN diff --git a/public/cursors/cursor2.png b/public/cursors/cursor2.png deleted file mode 100644 index c3d1a0b9da90e3876af5100579feba7592e10eb8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6469 zcmY*ecQ{<%)*hYF+aP-Hoy6#!VRX?uqet}K`zX=7AP9o!H90I2`?007IA1prWrkp3GjLjF%w zx(MaJ{$HYQf^*H2h@pe7fv15QRMh(QD;`Um*H$nd-&d}G2>@|l(I@v6%+r$2_m#7Y zhp4Xv!#@nsC;uK0H2xJg?pDc=^F#FfX3~uYdse6NB5s&&AWym)pgI@n0hUt0NEd zuy%KF^>ldcLibnK((1LBrvwAT-$ehp{#B=^gYADaxp@4$t)~Wg|3-NEdH8t$qy4m0 z{4Xl1;qCx?%KTSfl3)BE=KsU~okyJaZ}R_B%)dJQ2YqT)5-865pKX%_QkWqy001&c zh`fxhFVZh#hh)=!FG(N2gToSvaeMP@8QD+}69@tVSxA!;cC%Yzq`Ols3uG|ZVl8f` zrzOXYe#qusFT=mWhH2<=k^r8eN zM5GcNsWUedbmv_txwb!3u5lH_c!m{J9Ht?3@@R-M5QY9&5qqf_S=v(RxN2Da>Gr-x3#F<*8|0GlTg8Tbm7318rPOZ-(U1Ch7cUeLqE`2KwV zs%&er_()DV5DQ1%$o7dZFwo*sWham#F4QhEQ(kt;q+lO(+^2Yo*Tr!J52{1I#gtp2 zQPQSX7x;mA?BBBcM5AQgSwu40_~4-qT5)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9nzWl&|D&(0e0e@qls62=~)8z?%wII->Ai0%vwc6sSYVOfSTxK^dF=Fxpz1rZ*b zTh$$^hILO2;FR6SMm%wKy=TOc^3ph_;Bsp*K`~>WYbmB*Z#P66B zavI`)j6^I5JGwR73&(H3+R3Il%G|#vch;iHE<+gjC~&fi8nd_7MsK)CyyUDAdt7)0 zF{uFUb+`Wz0p5I7X9jj+q{{MQ8Tk|&`w#;IoG*--7rQ39&zH@ba-CLA%JVldqv!7$ zE_Gu4-F>chbMvQhto>e&RMn5Ij1(=0BD5?GvW702r%&9B%XRJB>#Vky7L7E0rLlKi zryC9!9YJ?b-aCXaQfcBQbI$I*yTKN(ekh#R!ySe8n#X~+PdYnm9u~G2ock9=_%@U3@n43 z`jRErESBhvQjm@E1)<`N)>y>q_GbyDlMTSS#DNIgep%TcvL-*~J=D1h;Vb_FW(J%@ zMlgYk& log in now with github or else +
diff --git a/public/main.html b/public/views/main.handlebars similarity index 97% rename from public/main.html rename to public/views/main.handlebars index e35f02ffb..9fb8a1673 100644 --- a/public/main.html +++ b/public/views/main.handlebars @@ -1,7 +1,7 @@ - cs4241 a2 + cs4241 a3 diff --git a/server.js b/server.js index b117ef3ba..be397eba3 100644 --- a/server.js +++ b/server.js @@ -1,26 +1,30 @@ require('dotenv').config(); -const express = require('express'), - mongodb = require('mongodb'), +const express = require( 'express' ), + cookie = require( 'cookie-session' ), + hbs = require( 'express-handlebars' ).engine, + bodyp = require( 'body-parser' ), + mongodb = require( 'mongodb' ), uri = `mongodb+srv://${process.env.MONGODB_USER}:${process.env.MONGODB_PASS}@${process.env.MONGODB_HOST}`, client = new mongodb.MongoClient(uri, {useNewUrlParser: true, useUnifiedTopology: true}), passport = require('passport'), GitHubStrategy = require('passport-github2').Strategy, app = express(); let collection = undefined; -client.connect().then( () => { collection = client.db( 'data' ).collection( 'movies' ) } ); -app.use( ( req, res, next ) => -{ - if( collection !== null ) { next(); } - else { res.status( 503 ).send(); } -}); app.use( express.static( 'public' ) ); -app.use( haltOnTimeout ); app.use( express.static( 'views' ) ); -app.use( haltOnTimeout ); app.use( express.json() ); -app.use( haltOnTimeout ); app.use( passport.initialize() ); app.use( passport.session() ); +client.connect().then( () => { collection = client.db( 'a3' ).collection( 'a3' ) } ); +app.use( ( req, res, next ) => +{ + if( collection !== null ) { next(); } + else { res.status( 503 ).send(); } +}); +app.engine( 'handlebars', hbs() ); +app.set( 'view engine', 'handlebars' ); +app.set( 'views', './views' ); +app.use( cookie ({ name: 'session', keys: [ 'key1', 'key2' ] }) ); passport.use(new GitHubStrategy({ clientID: process.env.GITHUB_CLIENT_ID, clientSecret: process.env.GITHUB_CLIENT_SECRET, @@ -31,13 +35,11 @@ passport.use(new GitHubStrategy({ function(err, user) { return done(err, user); }); } )); -app.get('/', ( req, res ) => { res.redirect('/index.html') }); -app.get('/login', ( req, res ) => -{ - res.sendFile('index.html', { user: req.user, root: Path2D.join(__dirname, 'public')}); -}); +app.get('/', ( req, res ) => { res.render( 'index' ) }); +app.get('/login', ( req, res ) => { res.render( 'main' ); }); + //res.sendFile('index.html', { user: req.user, root: Path2D.join(__dirname, 'public')}); app.get('/auth/github', passport.authenticate('github', { scope: [ 'user:email' ] })); -app.get('/auth/github/callback', passport.authenticate('github', { failureRedirect: '/login' }), function(req, res) { res.redirect('/main.html'); }); +app.get('/auth/github/callback', passport.authenticate('github', { failureRedirect: '/login' }), function(req, res) { res.render('main'); }); app.get('/data', checkAuth, ( req, res ) => { collection.find({ id:mongodb.ObjectId() }) From d7c994e142c071dbee4386e8c1a90b236931d4f3 Mon Sep 17 00:00:00 2001 From: hyoder Date: Sun, 25 Sep 2022 23:54:57 -0400 Subject: [PATCH 09/92] commit time --- public/scripts.js | 18 +++++++++++------- public/views/main.handlebars | 4 ++-- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/public/scripts.js b/public/scripts.js index 8696a5e03..e19850777 100644 --- a/public/scripts.js +++ b/public/scripts.js @@ -8,14 +8,14 @@ function dothething() function builder ( json ) { const tbl = document.getElementById( 'datatable' ); - tbl.innerHTML = 'titlegenreyeardirected by Todd Phillips?edit?delete?'; + tbl.innerHTML = 'titlegenreyeardirected by Zack Snyder?edit?delete?'; json.forEach(entry => { let newRow = ''; newRow += '' + entry.title.toString().toUpperCase() + ''; newRow += '' + entry.genre.toString().toUpperCase() + ''; newRow += '' + entry.year + ''; - newRow += '' + toddcheck( entry.title, entry.year ) + ''; + newRow += '' + zackcheck( entry.title, entry.year ) + ''; newRow += ''; newRow += ''; datatable.innerHTML += newRow; @@ -64,7 +64,7 @@ function updatercanceller( id ) newRow += '' + title + ''; newRow += '' + genre + ''; newRow += '' + year + ''; - newRow += '' + toddCheck(title, genre) + '<\th>'; + newRow += '' + zackCheck(title, genre) + '<\th>'; newRow += ''; newRow += ''; tempElement.innerHTML = newRow; @@ -85,10 +85,14 @@ function updatersubmitter( id ) tempID = null; tempElement = null; } -const toddcheck = function( title, year ) { - const years = [ 2000, 2003, 2004, 2006, 2009, 2010, 2011, 2013, 2016, 2019 ]; - const titles = [ 'ROAD TRIP', 'OLD SCHOOL', 'STARSKY & HUTCH', 'SCHOOL FOR SCOUNDRELS', 'THE HANGOVER', - 'DUE DATE', 'THE HANGOVER PART II', 'THE HANGOVER III', 'WAR DOGS', 'JOKER' ]; +const zackcheck = function( title, year ) { + //const years = [ 2000, 2003, 2004, 2006, 2009, 2010, 2011, 2013, 2016, 2019 ]; + //const titles = [ 'ROAD TRIP', 'OLD SCHOOL', 'STARSKY & HUTCH', 'SCHOOL FOR SCOUNDRELS', 'THE HANGOVER', + // 'DUE DATE', 'THE HANGOVER PART II', 'THE HANGOVER III', 'WAR DOGS', 'JOKER' ]; + const years = [ 2004, 2007, 2009, 2010, 2011, 2013, 2016, 2017, 2021, 2021 ]; + const titles = [ 'DAWN OF THE DEAD', '300', 'WATCHMEN', 'LEGEND OF THE GUARDIANS: THE OWLS OF GA\'HOOLE', + 'SUCKER PUNCH', 'MAN OF STEEL', 'BATMAN V SUPERMAN: DAWN OF JUSTICE', 'JUSTICE LEAGUE', + 'ZACK SNYDER\'S JUSTICE LEAGUE', 'ARMY OF THE DEAD'] const numFilms = 10; title = title.toString().toUpperCase(); for ( let i = 0 ; i < numFilms ; i++ ) { if( year == years[ i ] && title == titles[ i ] ) { return 'YES!'; } } diff --git a/public/views/main.handlebars b/public/views/main.handlebars index 9fb8a1673..f29dee692 100644 --- a/public/views/main.handlebars +++ b/public/views/main.handlebars @@ -12,9 +12,9 @@
-

want to know if a movie is directed by todd phillips?

+

want to know if a movie is directed by zack snyder?

you're in luck

-

disclaimer: todd phillips is not very good at making movies

+

disclaimer: zack snyder is not very good at making movies

From f43f09a9ce90d0ffa244d4c2edf0794547e51a01 Mon Sep 17 00:00:00 2001 From: hyoder Date: Mon, 26 Sep 2022 00:00:15 -0400 Subject: [PATCH 10/92] committerino --- package.json | 3 ++- server.js | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index a86def4c3..b5c4f5aae 100644 --- a/package.json +++ b/package.json @@ -8,6 +8,7 @@ "mongodb": "4.10.0", "passport": "0.6.0", "passport-github2": "0.1.12", - "dotenv": "16.0.2" + "dotenv": "16.0.2", + "cookie-session": "2.0.0" } } diff --git a/server.js b/server.js index be397eba3..c032a1619 100644 --- a/server.js +++ b/server.js @@ -1,14 +1,14 @@ require('dotenv').config(); const express = require( 'express' ), - cookie = require( 'cookie-session' ), + app = express(), +// cookie = require( 'cookie-session' ), hbs = require( 'express-handlebars' ).engine, bodyp = require( 'body-parser' ), mongodb = require( 'mongodb' ), uri = `mongodb+srv://${process.env.MONGODB_USER}:${process.env.MONGODB_PASS}@${process.env.MONGODB_HOST}`, client = new mongodb.MongoClient(uri, {useNewUrlParser: true, useUnifiedTopology: true}), passport = require('passport'), - GitHubStrategy = require('passport-github2').Strategy, - app = express(); + GitHubStrategy = require('passport-github2').Strategy; let collection = undefined; app.use( express.static( 'public' ) ); app.use( express.static( 'views' ) ); @@ -24,7 +24,7 @@ app.use( ( req, res, next ) => app.engine( 'handlebars', hbs() ); app.set( 'view engine', 'handlebars' ); app.set( 'views', './views' ); -app.use( cookie ({ name: 'session', keys: [ 'key1', 'key2' ] }) ); +//app.use( cookie ({ name: 'session', keys: [ 'key1', 'key2' ] }) ); passport.use(new GitHubStrategy({ clientID: process.env.GITHUB_CLIENT_ID, clientSecret: process.env.GITHUB_CLIENT_SECRET, From 337b88dd6ac60c456038377e3bf5c615402bc39d Mon Sep 17 00:00:00 2001 From: hyoder Date: Mon, 26 Sep 2022 00:25:03 -0400 Subject: [PATCH 11/92] committed, who me? --- server.js | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/server.js b/server.js index c032a1619..63f7e080e 100644 --- a/server.js +++ b/server.js @@ -4,6 +4,7 @@ const express = require( 'express' ), // cookie = require( 'cookie-session' ), hbs = require( 'express-handlebars' ).engine, bodyp = require( 'body-parser' ), + favicon = require( 'serve-favicon' ), mongodb = require( 'mongodb' ), uri = `mongodb+srv://${process.env.MONGODB_USER}:${process.env.MONGODB_PASS}@${process.env.MONGODB_HOST}`, client = new mongodb.MongoClient(uri, {useNewUrlParser: true, useUnifiedTopology: true}), @@ -13,8 +14,11 @@ let collection = undefined; app.use( express.static( 'public' ) ); app.use( express.static( 'views' ) ); app.use( express.json() ); +app.use( session({ secret: 'poop time', resave: false, saveUninitialized: false }) ); app.use( passport.initialize() ); app.use( passport.session() ); +passport.serializeUser( function( user, done ) { done( null, user ); } ); +passport.deserializeUser( function( obj, done ) { done( null, obj ); } ); client.connect().then( () => { collection = client.db( 'a3' ).collection( 'a3' ) } ); app.use( ( req, res, next ) => { @@ -66,7 +70,9 @@ app.post('/update', checkAuth, ( req, res ) => { $set: "items.$", changer }) .then( result => res.json( result ) ); }); -function checkAuth( req, res, next ) { - if ( allowed.includes(req.path) || req.isAuthenticated()) { return next(); } - res.redirect( '/login' ); }; -app.listen( process.env.PORT || 3000 ) \ No newline at end of file +function checkAuth( req, res, next ) +{ + if ( req.isAuthenticated()) { return next(); } + res.render( 'index' ); +}; +app.listen( process.env.PORT || 3000 ); \ No newline at end of file From 336a28e7132ad494352dc1f60ff470829ae873aa Mon Sep 17 00:00:00 2001 From: hyoder Date: Mon, 26 Sep 2022 00:29:09 -0400 Subject: [PATCH 12/92] forgot ot update package json whoops --- package.json | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index b5c4f5aae..f138d1b6f 100644 --- a/package.json +++ b/package.json @@ -3,12 +3,16 @@ "genre": "", "year": "", "scripts": { "start": "node server.js" }, - "dependencies": { + "dependencies": + { + "cookie-session": "2.0.0", + "dotenv": "16.0.2", "express": "4.18.1", + "express-handlebars": "6.0.6", + "favicon": "0.0.2", + "mime": "3.0.0", "mongodb": "4.10.0", "passport": "0.6.0", - "passport-github2": "0.1.12", - "dotenv": "16.0.2", - "cookie-session": "2.0.0" + "passport-github2": "0.1.12" } } From feb404720ff34b0038dd91d70b7e100834f79889 Mon Sep 17 00:00:00 2001 From: hyoder Date: Mon, 26 Sep 2022 00:30:20 -0400 Subject: [PATCH 13/92] forgot ot update package json whoops --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f138d1b6f..a5b517d8a 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "dotenv": "16.0.2", "express": "4.18.1", "express-handlebars": "6.0.6", - "favicon": "0.0.2", + "serve-favicon": "2.5.0", "mime": "3.0.0", "mongodb": "4.10.0", "passport": "0.6.0", From 5282d029301711a2ca3e4c12d9b4da476ee26066 Mon Sep 17 00:00:00 2001 From: hyoder Date: Mon, 26 Sep 2022 00:35:48 -0400 Subject: [PATCH 14/92] fixed port i think we pray --- server.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server.js b/server.js index 63f7e080e..d43bfddda 100644 --- a/server.js +++ b/server.js @@ -75,4 +75,4 @@ function checkAuth( req, res, next ) if ( req.isAuthenticated()) { return next(); } res.render( 'index' ); }; -app.listen( process.env.PORT || 3000 ); \ No newline at end of file +app.listen( process.env.PORT || 51201 ); \ No newline at end of file From 717b46c226fa5d53441353480295ce3f0e9216df Mon Sep 17 00:00:00 2001 From: hyoder Date: Mon, 26 Sep 2022 00:37:59 -0400 Subject: [PATCH 15/92] we pray more still --- package.json | 3 ++- server.js | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index a5b517d8a..2fef57f57 100644 --- a/package.json +++ b/package.json @@ -13,6 +13,7 @@ "mime": "3.0.0", "mongodb": "4.10.0", "passport": "0.6.0", - "passport-github2": "0.1.12" + "passport-github2": "0.1.12", + "session": "0.1.0" } } diff --git a/server.js b/server.js index d43bfddda..44d603888 100644 --- a/server.js +++ b/server.js @@ -5,6 +5,7 @@ const express = require( 'express' ), hbs = require( 'express-handlebars' ).engine, bodyp = require( 'body-parser' ), favicon = require( 'serve-favicon' ), + session = require( 'session' ), mongodb = require( 'mongodb' ), uri = `mongodb+srv://${process.env.MONGODB_USER}:${process.env.MONGODB_PASS}@${process.env.MONGODB_HOST}`, client = new mongodb.MongoClient(uri, {useNewUrlParser: true, useUnifiedTopology: true}), From ccb58f887642577d65364e2c39cbeee9625231a5 Mon Sep 17 00:00:00 2001 From: hyoder Date: Mon, 26 Sep 2022 00:39:51 -0400 Subject: [PATCH 16/92] we pray even more still --- package.json | 4 ++-- server.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 2fef57f57..eb767ff46 100644 --- a/package.json +++ b/package.json @@ -9,11 +9,11 @@ "dotenv": "16.0.2", "express": "4.18.1", "express-handlebars": "6.0.6", + "express-session": "1.17.3", "serve-favicon": "2.5.0", "mime": "3.0.0", "mongodb": "4.10.0", "passport": "0.6.0", - "passport-github2": "0.1.12", - "session": "0.1.0" + "passport-github2": "0.1.12" } } diff --git a/server.js b/server.js index 44d603888..a2273353e 100644 --- a/server.js +++ b/server.js @@ -5,7 +5,7 @@ const express = require( 'express' ), hbs = require( 'express-handlebars' ).engine, bodyp = require( 'body-parser' ), favicon = require( 'serve-favicon' ), - session = require( 'session' ), + session = require( 'express-session' ), mongodb = require( 'mongodb' ), uri = `mongodb+srv://${process.env.MONGODB_USER}:${process.env.MONGODB_PASS}@${process.env.MONGODB_HOST}`, client = new mongodb.MongoClient(uri, {useNewUrlParser: true, useUnifiedTopology: true}), From 6966967439da7061f0c6559571bb9815da7efa00 Mon Sep 17 00:00:00 2001 From: hyoder Date: Mon, 26 Sep 2022 11:50:33 -0400 Subject: [PATCH 17/92] commit --- package.json | 3 ++- server.js | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index eb767ff46..1e4518b9b 100644 --- a/package.json +++ b/package.json @@ -14,6 +14,7 @@ "mime": "3.0.0", "mongodb": "4.10.0", "passport": "0.6.0", - "passport-github2": "0.1.12" + "passport-github2": "0.1.12", + "path": "0.12.7" } } diff --git a/server.js b/server.js index a2273353e..99f0ddb8c 100644 --- a/server.js +++ b/server.js @@ -6,13 +6,14 @@ const express = require( 'express' ), bodyp = require( 'body-parser' ), favicon = require( 'serve-favicon' ), session = require( 'express-session' ), + path = require( 'path' ), mongodb = require( 'mongodb' ), uri = `mongodb+srv://${process.env.MONGODB_USER}:${process.env.MONGODB_PASS}@${process.env.MONGODB_HOST}`, client = new mongodb.MongoClient(uri, {useNewUrlParser: true, useUnifiedTopology: true}), passport = require('passport'), GitHubStrategy = require('passport-github2').Strategy; let collection = undefined; -app.use( express.static( 'public' ) ); +app.use( express.static( path.join( __dirname + '../public' ) ) ); app.use( express.static( 'views' ) ); app.use( express.json() ); app.use( session({ secret: 'poop time', resave: false, saveUninitialized: false }) ); From 8d8be8738548e0f94bf9315a675a746f421d9ada Mon Sep 17 00:00:00 2001 From: hyoder Date: Mon, 26 Sep 2022 12:07:15 -0400 Subject: [PATCH 18/92] commit --- server.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server.js b/server.js index 99f0ddb8c..c1e171ee5 100644 --- a/server.js +++ b/server.js @@ -41,8 +41,8 @@ passport.use(new GitHubStrategy({ function(err, user) { return done(err, user); }); } )); -app.get('/', ( req, res ) => { res.render( 'index' ) }); -app.get('/login', ( req, res ) => { res.render( 'main' ); }); +app.get('/', ( req, res ) => { res.render( "index", { msg: "", layout: false } ) } ); +app.get('/login', ( req, res ) => { res.render( "main", { msg: "", layout: false } ); } ); //res.sendFile('index.html', { user: req.user, root: Path2D.join(__dirname, 'public')}); app.get('/auth/github', passport.authenticate('github', { scope: [ 'user:email' ] })); app.get('/auth/github/callback', passport.authenticate('github', { failureRedirect: '/login' }), function(req, res) { res.render('main'); }); From ebe4d1fadc551fc017cd41e5ce330d903a5f3005 Mon Sep 17 00:00:00 2001 From: hyoder Date: Mon, 26 Sep 2022 12:11:50 -0400 Subject: [PATCH 19/92] commit --- server.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/server.js b/server.js index c1e171ee5..555a343df 100644 --- a/server.js +++ b/server.js @@ -1,11 +1,10 @@ require('dotenv').config(); const express = require( 'express' ), app = express(), -// cookie = require( 'cookie-session' ), + cookie = require( 'cookie-session' ), hbs = require( 'express-handlebars' ).engine, bodyp = require( 'body-parser' ), favicon = require( 'serve-favicon' ), - session = require( 'express-session' ), path = require( 'path' ), mongodb = require( 'mongodb' ), uri = `mongodb+srv://${process.env.MONGODB_USER}:${process.env.MONGODB_PASS}@${process.env.MONGODB_HOST}`, @@ -45,7 +44,7 @@ app.get('/', ( req, res ) => { res.render( "index", { msg: "", layout: false } ) app.get('/login', ( req, res ) => { res.render( "main", { msg: "", layout: false } ); } ); //res.sendFile('index.html', { user: req.user, root: Path2D.join(__dirname, 'public')}); app.get('/auth/github', passport.authenticate('github', { scope: [ 'user:email' ] })); -app.get('/auth/github/callback', passport.authenticate('github', { failureRedirect: '/login' }), function(req, res) { res.render('main'); }); +app.get('/auth/github/callback', passport.authenticate('github', { failureRedirect: '/login' }), function(req, res) { res.render( "main", { msg: "", layout: false } ); } ); app.get('/data', checkAuth, ( req, res ) => { collection.find({ id:mongodb.ObjectId() }) @@ -75,6 +74,6 @@ app.post('/update', checkAuth, ( req, res ) => function checkAuth( req, res, next ) { if ( req.isAuthenticated()) { return next(); } - res.render( 'index' ); + res.render( "index", { msg: "", layout: false } ); }; app.listen( process.env.PORT || 51201 ); \ No newline at end of file From 019831215411a8f2fa8f48413c565c3bf77722cb Mon Sep 17 00:00:00 2001 From: hyoder Date: Mon, 26 Sep 2022 12:14:52 -0400 Subject: [PATCH 20/92] commit --- server.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/server.js b/server.js index 555a343df..cdd5f61c9 100644 --- a/server.js +++ b/server.js @@ -1,10 +1,11 @@ require('dotenv').config(); const express = require( 'express' ), app = express(), - cookie = require( 'cookie-session' ), + session = require( 'cookie-session' ), hbs = require( 'express-handlebars' ).engine, bodyp = require( 'body-parser' ), favicon = require( 'serve-favicon' ), +// session = require( 'express-session' ), path = require( 'path' ), mongodb = require( 'mongodb' ), uri = `mongodb+srv://${process.env.MONGODB_USER}:${process.env.MONGODB_PASS}@${process.env.MONGODB_HOST}`, @@ -15,9 +16,9 @@ let collection = undefined; app.use( express.static( path.join( __dirname + '../public' ) ) ); app.use( express.static( 'views' ) ); app.use( express.json() ); -app.use( session({ secret: 'poop time', resave: false, saveUninitialized: false }) ); app.use( passport.initialize() ); app.use( passport.session() ); +app.use( session({ secret: 'poop time', resave: false, saveUninitialized: false }) ); passport.serializeUser( function( user, done ) { done( null, user ); } ); passport.deserializeUser( function( obj, done ) { done( null, obj ); } ); client.connect().then( () => { collection = client.db( 'a3' ).collection( 'a3' ) } ); From 00df1f6bdf1caa450c850a87d0b14a0b87b496c8 Mon Sep 17 00:00:00 2001 From: hyoder Date: Mon, 26 Sep 2022 12:15:57 -0400 Subject: [PATCH 21/92] commit --- server.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server.js b/server.js index cdd5f61c9..9640837f1 100644 --- a/server.js +++ b/server.js @@ -1,11 +1,11 @@ require('dotenv').config(); const express = require( 'express' ), app = express(), - session = require( 'cookie-session' ), + cookie = require( 'cookie-session' ), hbs = require( 'express-handlebars' ).engine, bodyp = require( 'body-parser' ), favicon = require( 'serve-favicon' ), -// session = require( 'express-session' ), + session = require( 'express-session' ), path = require( 'path' ), mongodb = require( 'mongodb' ), uri = `mongodb+srv://${process.env.MONGODB_USER}:${process.env.MONGODB_PASS}@${process.env.MONGODB_HOST}`, @@ -18,7 +18,7 @@ app.use( express.static( 'views' ) ); app.use( express.json() ); app.use( passport.initialize() ); app.use( passport.session() ); -app.use( session({ secret: 'poop time', resave: false, saveUninitialized: false }) ); +app.use( cookie({ secret: 'poop time', resave: false, saveUninitialized: false }) ); passport.serializeUser( function( user, done ) { done( null, user ); } ); passport.deserializeUser( function( obj, done ) { done( null, obj ); } ); client.connect().then( () => { collection = client.db( 'a3' ).collection( 'a3' ) } ); From 3763b3ee27f0c34b06df4fc7b8eb23a49ffa6d3a Mon Sep 17 00:00:00 2001 From: hyoder Date: Mon, 26 Sep 2022 12:22:42 -0400 Subject: [PATCH 22/92] commit --- server.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/server.js b/server.js index 9640837f1..983caaaa9 100644 --- a/server.js +++ b/server.js @@ -13,12 +13,13 @@ const express = require( 'express' ), passport = require('passport'), GitHubStrategy = require('passport-github2').Strategy; let collection = undefined; -app.use( express.static( path.join( __dirname + '../public' ) ) ); -app.use( express.static( 'views' ) ); -app.use( express.json() ); +app.use( express.favicon() ); +app.use( express.bodyp() ); +app.use( cookie({ secret: 'poop time', resave: false, saveUninitialized: false }) ); app.use( passport.initialize() ); app.use( passport.session() ); -app.use( cookie({ secret: 'poop time', resave: false, saveUninitialized: false }) ); +app.use( express.static( path.join( __dirname + '../public' ) ) ); +app.use( express.static( 'views' ) ); passport.serializeUser( function( user, done ) { done( null, user ); } ); passport.deserializeUser( function( obj, done ) { done( null, obj ); } ); client.connect().then( () => { collection = client.db( 'a3' ).collection( 'a3' ) } ); From 5a3947d3e7fdd0057e88ced59de05746a38a4124 Mon Sep 17 00:00:00 2001 From: hyoder <73266860+hyoder@users.noreply.github.com> Date: Mon, 26 Sep 2022 12:25:13 -0400 Subject: [PATCH 23/92] Rename procfile to Procfile --- Procfile | 1 + procfile | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) create mode 100644 Procfile delete mode 100644 procfile diff --git a/Procfile b/Procfile new file mode 100644 index 000000000..489b2700a --- /dev/null +++ b/Procfile @@ -0,0 +1 @@ +web: node server.js diff --git a/procfile b/procfile deleted file mode 100644 index 6f86b16c8..000000000 --- a/procfile +++ /dev/null @@ -1 +0,0 @@ -web: node server.js \ No newline at end of file From cdf6e44a71c1aef4774cb1b1faf5a0312ef7d6be Mon Sep 17 00:00:00 2001 From: hyoder Date: Mon, 26 Sep 2022 13:01:10 -0400 Subject: [PATCH 24/92] commit --- package.json | 3 ++- server.js | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 1e4518b9b..f7447e2af 100644 --- a/package.json +++ b/package.json @@ -16,5 +16,6 @@ "passport": "0.6.0", "passport-github2": "0.1.12", "path": "0.12.7" - } + }, + "engines": { "node": "16.17.0" } } diff --git a/server.js b/server.js index 983caaaa9..11b098910 100644 --- a/server.js +++ b/server.js @@ -78,4 +78,7 @@ function checkAuth( req, res, next ) if ( req.isAuthenticated()) { return next(); } res.render( "index", { msg: "", layout: false } ); }; -app.listen( process.env.PORT || 51201 ); \ No newline at end of file +app.listen(process.env.PORT || 3000, function() +{ + console.log("Express server listening on port %d in %s mode", this.address().port, app.settings.env); +}); \ No newline at end of file From a023adc9f7a9399fe497b350a0221a72c4eae6a8 Mon Sep 17 00:00:00 2001 From: hyoder Date: Mon, 26 Sep 2022 13:02:48 -0400 Subject: [PATCH 25/92] commit --- server.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/server.js b/server.js index 11b098910..0e2f715f8 100644 --- a/server.js +++ b/server.js @@ -4,7 +4,6 @@ const express = require( 'express' ), cookie = require( 'cookie-session' ), hbs = require( 'express-handlebars' ).engine, bodyp = require( 'body-parser' ), - favicon = require( 'serve-favicon' ), session = require( 'express-session' ), path = require( 'path' ), mongodb = require( 'mongodb' ), @@ -13,7 +12,6 @@ const express = require( 'express' ), passport = require('passport'), GitHubStrategy = require('passport-github2').Strategy; let collection = undefined; -app.use( express.favicon() ); app.use( express.bodyp() ); app.use( cookie({ secret: 'poop time', resave: false, saveUninitialized: false }) ); app.use( passport.initialize() ); From 200fc89fcf3880459ed8702fe8aa54969c0c5354 Mon Sep 17 00:00:00 2001 From: hyoder Date: Mon, 26 Sep 2022 13:04:23 -0400 Subject: [PATCH 26/92] commit --- server.js | 1 - 1 file changed, 1 deletion(-) diff --git a/server.js b/server.js index 0e2f715f8..475839316 100644 --- a/server.js +++ b/server.js @@ -12,7 +12,6 @@ const express = require( 'express' ), passport = require('passport'), GitHubStrategy = require('passport-github2').Strategy; let collection = undefined; -app.use( express.bodyp() ); app.use( cookie({ secret: 'poop time', resave: false, saveUninitialized: false }) ); app.use( passport.initialize() ); app.use( passport.session() ); From 3035bcfe5ee713ca614cbb97eaff61caec43cc1a Mon Sep 17 00:00:00 2001 From: hyoder Date: Mon, 26 Sep 2022 13:10:30 -0400 Subject: [PATCH 27/92] commit --- server.js | 1 + 1 file changed, 1 insertion(+) diff --git a/server.js b/server.js index 475839316..25c20af23 100644 --- a/server.js +++ b/server.js @@ -12,6 +12,7 @@ const express = require( 'express' ), passport = require('passport'), GitHubStrategy = require('passport-github2').Strategy; let collection = undefined; +app.use( bodyp.json() ); app.use( cookie({ secret: 'poop time', resave: false, saveUninitialized: false }) ); app.use( passport.initialize() ); app.use( passport.session() ); From c2dd2f3d61e2034c5b321bdac9f93b7ac2b19b1a Mon Sep 17 00:00:00 2001 From: hyoder Date: Mon, 26 Sep 2022 13:13:20 -0400 Subject: [PATCH 28/92] commit --- server.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server.js b/server.js index 25c20af23..53f3371f7 100644 --- a/server.js +++ b/server.js @@ -28,7 +28,7 @@ app.use( ( req, res, next ) => }); app.engine( 'handlebars', hbs() ); app.set( 'view engine', 'handlebars' ); -app.set( 'views', './views' ); +app.set( 'views', './public/views' ); //app.use( cookie ({ name: 'session', keys: [ 'key1', 'key2' ] }) ); passport.use(new GitHubStrategy({ clientID: process.env.GITHUB_CLIENT_ID, From 4621c48a8a1dcbcceac1dab74592fff6c654dab3 Mon Sep 17 00:00:00 2001 From: hyoder Date: Mon, 26 Sep 2022 13:18:23 -0400 Subject: [PATCH 29/92] commit --- server.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/server.js b/server.js index 53f3371f7..e8e3bdfc0 100644 --- a/server.js +++ b/server.js @@ -36,9 +36,15 @@ passport.use(new GitHubStrategy({ callbackURL: 'https://a3-hyoder.herokuapp.com/auth/github/callback' }, function(accessToken, refreshToken, profile, done) { - User.findOrCreate({ githubId: profile.id }, - function(err, user) { return done(err, user); }); + process.nextTick(function () + { + return collection.updateOne( { githubID:profile.id }, { $setOnInsert: { githubID:profile.id, items:[] } }, { upsert: true } ) + .then(() => { return collection.findOne( { githubID: profile.id } ) } ) + .then((result) => { return done(null, result._id) } ) + }); } + //User.findOrCreate({ githubId: profile.id }, + //function(err, user) { return done(err, user); }); )); app.get('/', ( req, res ) => { res.render( "index", { msg: "", layout: false } ) } ); app.get('/login', ( req, res ) => { res.render( "main", { msg: "", layout: false } ); } ); From ec478d8acd957ebe474c17ea4a98c80c030dbc01 Mon Sep 17 00:00:00 2001 From: hyoder Date: Mon, 26 Sep 2022 13:22:03 -0400 Subject: [PATCH 30/92] commit --- server.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server.js b/server.js index e8e3bdfc0..7c6cbbfd3 100644 --- a/server.js +++ b/server.js @@ -50,7 +50,8 @@ app.get('/', ( req, res ) => { res.render( "index", { msg: "", layout: false } ) app.get('/login', ( req, res ) => { res.render( "main", { msg: "", layout: false } ); } ); //res.sendFile('index.html', { user: req.user, root: Path2D.join(__dirname, 'public')}); app.get('/auth/github', passport.authenticate('github', { scope: [ 'user:email' ] })); -app.get('/auth/github/callback', passport.authenticate('github', { failureRedirect: '/login' }), function(req, res) { res.render( "main", { msg: "", layout: false } ); } ); +app.get('/auth/github/callback', passport.authenticate('github', { failureRedirect: '/login' }), + function(req, res) { res.redirect( "/main.handlebars" ); } ); app.get('/data', checkAuth, ( req, res ) => { collection.find({ id:mongodb.ObjectId() }) From 1b1b6488edd520eb15dea65f9a8c896f0fae94a9 Mon Sep 17 00:00:00 2001 From: hyoder Date: Mon, 26 Sep 2022 13:30:42 -0400 Subject: [PATCH 31/92] commit --- public/views/index.handlebars | 2 +- server.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/public/views/index.handlebars b/public/views/index.handlebars index db34778c0..b0db28043 100644 --- a/public/views/index.handlebars +++ b/public/views/index.handlebars @@ -3,7 +3,7 @@ log in now with github or else - +
diff --git a/server.js b/server.js index 7c6cbbfd3..c09c817cd 100644 --- a/server.js +++ b/server.js @@ -51,7 +51,7 @@ app.get('/login', ( req, res ) => { res.render( "main", { msg: "", layout: false //res.sendFile('index.html', { user: req.user, root: Path2D.join(__dirname, 'public')}); app.get('/auth/github', passport.authenticate('github', { scope: [ 'user:email' ] })); app.get('/auth/github/callback', passport.authenticate('github', { failureRedirect: '/login' }), - function(req, res) { res.redirect( "/main.handlebars" ); } ); + function(req, res) { res.render( "main", { msg: "", layout: false } ); } ); app.get('/data', checkAuth, ( req, res ) => { collection.find({ id:mongodb.ObjectId() }) From 4979bd7c258471e744ae571589b40c2d1615e15c Mon Sep 17 00:00:00 2001 From: hyoder Date: Mon, 26 Sep 2022 13:35:27 -0400 Subject: [PATCH 32/92] commit --- public/views/index.handlebars | 2 +- public/views/main.handlebars | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/public/views/index.handlebars b/public/views/index.handlebars index b0db28043..c67a71c8c 100644 --- a/public/views/index.handlebars +++ b/public/views/index.handlebars @@ -3,7 +3,7 @@ log in now with github or else - +
diff --git a/public/views/main.handlebars b/public/views/main.handlebars index f29dee692..1c986b8c4 100644 --- a/public/views/main.handlebars +++ b/public/views/main.handlebars @@ -7,7 +7,7 @@ - +
From a6e6ce0d3ef05fe42e89abbcf4f40b1404f1f10a Mon Sep 17 00:00:00 2001 From: hyoder Date: Mon, 26 Sep 2022 13:41:26 -0400 Subject: [PATCH 33/92] commit --- .env | 2 +- public/views/index.handlebars | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.env b/.env index f3a322657..2a0112136 100644 --- a/.env +++ b/.env @@ -1,6 +1,6 @@ MONGODB_USER = generic MONGODB_PASS = freeaccess -MONGODB_HOST = "a3.1joplnl.mongodb.net/" +MONGODB_HOST = "a3.1joplnl.mongodb.net/?retryWrites=true&w=majority" GITHUB_CLIENT_ID = "5d83b71ec160d51c1b6f" GITHUB_CLIENT_SECRET = "4cbb4b0394c1a9966ea431b3ce5cbe86ebcf2bde" \ No newline at end of file diff --git a/public/views/index.handlebars b/public/views/index.handlebars index c67a71c8c..7c8ab3852 100644 --- a/public/views/index.handlebars +++ b/public/views/index.handlebars @@ -3,7 +3,7 @@ log in now with github or else - +
From 2d479234f9d8f149e60498e4c8fd04b8e9f1716d Mon Sep 17 00:00:00 2001 From: hyoder Date: Mon, 26 Sep 2022 13:44:06 -0400 Subject: [PATCH 34/92] commit --- public/views/index.handlebars | 2 +- public/views/main.handlebars | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/public/views/index.handlebars b/public/views/index.handlebars index 7c8ab3852..8dd6ed77d 100644 --- a/public/views/index.handlebars +++ b/public/views/index.handlebars @@ -3,7 +3,7 @@ log in now with github or else - +
diff --git a/public/views/main.handlebars b/public/views/main.handlebars index 1c986b8c4..502c0f41f 100644 --- a/public/views/main.handlebars +++ b/public/views/main.handlebars @@ -7,7 +7,7 @@ - +
From e13eeb5a147bf97fb2fa9e1f4ffb62e976e28059 Mon Sep 17 00:00:00 2001 From: hyoder Date: Mon, 26 Sep 2022 13:48:57 -0400 Subject: [PATCH 35/92] commit --- public/views/index.handlebars | 2 +- public/views/main.handlebars | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/public/views/index.handlebars b/public/views/index.handlebars index 8dd6ed77d..f3ef71dcf 100644 --- a/public/views/index.handlebars +++ b/public/views/index.handlebars @@ -3,7 +3,7 @@ log in now with github or else - +
diff --git a/public/views/main.handlebars b/public/views/main.handlebars index 502c0f41f..1c986b8c4 100644 --- a/public/views/main.handlebars +++ b/public/views/main.handlebars @@ -7,7 +7,7 @@ - +
From 86ca5ace68cb98cffcde45247056cb211bf361f8 Mon Sep 17 00:00:00 2001 From: hyoder Date: Mon, 26 Sep 2022 13:51:21 -0400 Subject: [PATCH 36/92] commit --- server.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server.js b/server.js index c09c817cd..0c37d0053 100644 --- a/server.js +++ b/server.js @@ -16,7 +16,7 @@ app.use( bodyp.json() ); app.use( cookie({ secret: 'poop time', resave: false, saveUninitialized: false }) ); app.use( passport.initialize() ); app.use( passport.session() ); -app.use( express.static( path.join( __dirname + '../public' ) ) ); +app.use( express.static( path.join( __dirname + '/public' ) ) ); app.use( express.static( 'views' ) ); passport.serializeUser( function( user, done ) { done( null, user ); } ); passport.deserializeUser( function( obj, done ) { done( null, obj ); } ); From 4dbabaab771d699afcd09e0620491caead7d8165 Mon Sep 17 00:00:00 2001 From: hyoder Date: Mon, 26 Sep 2022 13:55:09 -0400 Subject: [PATCH 37/92] commit --- server.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/server.js b/server.js index 0c37d0053..ee82c2667 100644 --- a/server.js +++ b/server.js @@ -36,15 +36,15 @@ passport.use(new GitHubStrategy({ callbackURL: 'https://a3-hyoder.herokuapp.com/auth/github/callback' }, function(accessToken, refreshToken, profile, done) { - process.nextTick(function () + /* process.nextTick(function () { return collection.updateOne( { githubID:profile.id }, { $setOnInsert: { githubID:profile.id, items:[] } }, { upsert: true } ) .then(() => { return collection.findOne( { githubID: profile.id } ) } ) .then((result) => { return done(null, result._id) } ) - }); + });*/ + User.findOrCreate({ githubId: profile.id }, + function(err, user) { return done(err, user); }); } - //User.findOrCreate({ githubId: profile.id }, - //function(err, user) { return done(err, user); }); )); app.get('/', ( req, res ) => { res.render( "index", { msg: "", layout: false } ) } ); app.get('/login', ( req, res ) => { res.render( "main", { msg: "", layout: false } ); } ); From b824eae02621f0197f7e8f5de7d799372267188a Mon Sep 17 00:00:00 2001 From: hyoder Date: Mon, 26 Sep 2022 14:00:35 -0400 Subject: [PATCH 38/92] commit --- public/views/index.handlebars | 1 - 1 file changed, 1 deletion(-) diff --git a/public/views/index.handlebars b/public/views/index.handlebars index f3ef71dcf..5f2f47d75 100644 --- a/public/views/index.handlebars +++ b/public/views/index.handlebars @@ -3,7 +3,6 @@ log in now with github or else -
From 56417de97f4cb9a49a7afad16ed19c2cd46555c3 Mon Sep 17 00:00:00 2001 From: hyoder Date: Mon, 26 Sep 2022 14:03:37 -0400 Subject: [PATCH 39/92] commit --- server.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/server.js b/server.js index ee82c2667..0d522ab75 100644 --- a/server.js +++ b/server.js @@ -36,14 +36,14 @@ passport.use(new GitHubStrategy({ callbackURL: 'https://a3-hyoder.herokuapp.com/auth/github/callback' }, function(accessToken, refreshToken, profile, done) { - /* process.nextTick(function () + process.nextTick(function () { return collection.updateOne( { githubID:profile.id }, { $setOnInsert: { githubID:profile.id, items:[] } }, { upsert: true } ) .then(() => { return collection.findOne( { githubID: profile.id } ) } ) .then((result) => { return done(null, result._id) } ) - });*/ - User.findOrCreate({ githubId: profile.id }, - function(err, user) { return done(err, user); }); + }); + //User.findOrCreate({ githubId: profile.id }, + //function(err, user) { return done(err, user); }); } )); app.get('/', ( req, res ) => { res.render( "index", { msg: "", layout: false } ) } ); From cf8108188362f2c5c1e3615a12d1d45b29624233 Mon Sep 17 00:00:00 2001 From: hyoder Date: Mon, 26 Sep 2022 14:10:20 -0400 Subject: [PATCH 40/92] commit --- package.json | 2 +- server.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index f7447e2af..a7602a960 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "serve-favicon": "2.5.0", "mime": "3.0.0", "mongodb": "4.10.0", - "passport": "0.6.0", + "passport": "0.5.0", "passport-github2": "0.1.12", "path": "0.12.7" }, diff --git a/server.js b/server.js index 0d522ab75..c12ee1e36 100644 --- a/server.js +++ b/server.js @@ -39,8 +39,8 @@ passport.use(new GitHubStrategy({ process.nextTick(function () { return collection.updateOne( { githubID:profile.id }, { $setOnInsert: { githubID:profile.id, items:[] } }, { upsert: true } ) - .then(() => { return collection.findOne( { githubID: profile.id } ) } ) - .then((result) => { return done(null, result._id) } ) + .then( () => { return collection.findOne( { githubID: profile.id } ) } ) + .then( ( result ) => { return done( null, result._id ) } ) }); //User.findOrCreate({ githubId: profile.id }, //function(err, user) { return done(err, user); }); From dcad5f5e3b4dea096c8e348e0457d98d45217945 Mon Sep 17 00:00:00 2001 From: hyoder Date: Mon, 26 Sep 2022 14:18:00 -0400 Subject: [PATCH 41/92] commit --- public/views/main.handlebars | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/views/main.handlebars b/public/views/main.handlebars index 1c986b8c4..502c0f41f 100644 --- a/public/views/main.handlebars +++ b/public/views/main.handlebars @@ -7,7 +7,7 @@ - +
From a64fb29e5c1fbe5b9b8d9d799c1cce924a13d3ae Mon Sep 17 00:00:00 2001 From: hyoder Date: Mon, 26 Sep 2022 14:22:05 -0400 Subject: [PATCH 42/92] commit --- public/views/main.handlebars | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/views/main.handlebars b/public/views/main.handlebars index 502c0f41f..320437bb5 100644 --- a/public/views/main.handlebars +++ b/public/views/main.handlebars @@ -7,7 +7,7 @@ - +
From 48d4c161ae310142d4682cf4fff4962f34691a2a Mon Sep 17 00:00:00 2001 From: hyoder Date: Mon, 26 Sep 2022 14:32:47 -0400 Subject: [PATCH 43/92] commit --- public/views/index.handlebars | 2 +- public/views/main.handlebars | 106 +++++++++++++++++++++++++++++++++- 2 files changed, 106 insertions(+), 2 deletions(-) diff --git a/public/views/index.handlebars b/public/views/index.handlebars index 5f2f47d75..7b4fdadf7 100644 --- a/public/views/index.handlebars +++ b/public/views/index.handlebars @@ -1,4 +1,4 @@ - + diff --git a/public/views/main.handlebars b/public/views/main.handlebars index 320437bb5..6dba96489 100644 --- a/public/views/main.handlebars +++ b/public/views/main.handlebars @@ -7,7 +7,111 @@ - +
From 02c8d1a238311c18af935bc32b2b314220f6c716 Mon Sep 17 00:00:00 2001 From: hyoder Date: Mon, 26 Sep 2022 14:36:18 -0400 Subject: [PATCH 44/92] commit --- public/views/main.handlebars | 46 +++++++++++++++++++----------------- 1 file changed, 24 insertions(+), 22 deletions(-) diff --git a/public/views/main.handlebars b/public/views/main.handlebars index 6dba96489..a6e7af1be 100644 --- a/public/views/main.handlebars +++ b/public/views/main.handlebars @@ -7,6 +7,29 @@ + + +
+
+

want to know if a movie is directed by zack snyder?

+

you're in luck

+

disclaimer: zack snyder is not very good at making movies

+ +
+ +
+
+ +
+
+ +

+
+
+

data:

+
+
+
- - -
-
-

want to know if a movie is directed by zack snyder?

-

you're in luck

-

disclaimer: zack snyder is not very good at making movies

-
-
- -
-
- -
-
- -

-
-
-

data:

-
+ From 3b808ba2c19f6dff5fdc01194d61ce7ca5822e2d Mon Sep 17 00:00:00 2001 From: hyoder Date: Mon, 26 Sep 2022 14:59:19 -0400 Subject: [PATCH 45/92] commit --- package.json | 13 ++++++++----- public/scripts.js | 35 ++++++++++++++++------------------- public/views/main.handlebars | 3 --- server.js | 17 ++++++++--------- 4 files changed, 32 insertions(+), 36 deletions(-) diff --git a/package.json b/package.json index a7602a960..fa64f5b1f 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { - "title": "", - "genre": "", - "year": "", - "scripts": { "start": "node server.js" }, + "scripts": + { + "start": "node server.js" + }, "dependencies": { "cookie-session": "2.0.0", @@ -17,5 +17,8 @@ "passport-github2": "0.1.12", "path": "0.12.7" }, - "engines": { "node": "16.17.0" } + "engines": + { + "node": "16.17.0" + } } diff --git a/public/scripts.js b/public/scripts.js index e19850777..4706b1c6d 100644 --- a/public/scripts.js +++ b/public/scripts.js @@ -11,13 +11,13 @@ function builder ( json ) tbl.innerHTML = 'titlegenreyeardirected by Zack Snyder?edit?delete?'; json.forEach(entry => { - let newRow = ''; + let newRow = ''; newRow += '' + entry.title.toString().toUpperCase() + ''; newRow += '' + entry.genre.toString().toUpperCase() + ''; newRow += '' + entry.year + ''; newRow += '' + zackcheck( entry.title, entry.year ) + ''; - newRow += ''; - newRow += ''; + newRow += ''; + newRow += ''; datatable.innerHTML += newRow; }); }; @@ -33,21 +33,21 @@ function submitter( e ) .then(dothething()); return false; }; -function deleter( id ) +function deleter( _movID ) { - const json = { id: x.id }, + const json = { _movID: x._movID }, body = JSON.stringify( json ); fetch( '/delete', { method: 'POST', headers: { "Content-Type": "application/json" }, body } ) .then( response => { response.json() }) .then( dothething() ); return false; }; -function updater( id, title, genre, year ) +function updater( _movID, title, genre, year ) { if( tempElement != null && tempID != null ) { updatercanceller( tempID ); } - tempID = id; + tempID = _movID; tempElement = document.getElementById('row-'+id); - let newRow = '' + id + ''; + let newRow = '' + _movID + ''; newRow += '' newRow += '' newRow += '' @@ -55,7 +55,7 @@ function updater( id, title, genre, year ) newRow += ''; - newRow += ''; + newRow += ''; + newRow += ''; tempElement.innerHTML = newRow; tempElement = null; tempID = null; }; -function updatersubmitter( id ) +function updatersubmitter( _movID ) { - const json = { id: id, - title: document.getElementById('title-'+id).value, - genre: document.getElementById('genre-'+id).value, - year: document.getElementById( 'year-'+id).value + const json = { _movID: _movID, + title: document.getElementById('title-'+id).value, + genre: document.getElementById('genre-'+id).value, + year: document.getElementById( 'year-'+id).value }, body = JSON.stringify(json); fetch( '/update', { method: 'POST', headers: { "Content-Type": "application/json" }, body }) @@ -86,9 +86,6 @@ function updatersubmitter( id ) tempElement = null; } const zackcheck = function( title, year ) { - //const years = [ 2000, 2003, 2004, 2006, 2009, 2010, 2011, 2013, 2016, 2019 ]; - //const titles = [ 'ROAD TRIP', 'OLD SCHOOL', 'STARSKY & HUTCH', 'SCHOOL FOR SCOUNDRELS', 'THE HANGOVER', - // 'DUE DATE', 'THE HANGOVER PART II', 'THE HANGOVER III', 'WAR DOGS', 'JOKER' ]; const years = [ 2004, 2007, 2009, 2010, 2011, 2013, 2016, 2017, 2021, 2021 ]; const titles = [ 'DAWN OF THE DEAD', '300', 'WATCHMEN', 'LEGEND OF THE GUARDIANS: THE OWLS OF GA\'HOOLE', 'SUCKER PUNCH', 'MAN OF STEEL', 'BATMAN V SUPERMAN: DAWN OF JUSTICE', 'JUSTICE LEAGUE', diff --git a/public/views/main.handlebars b/public/views/main.handlebars index a6e7af1be..53e670702 100644 --- a/public/views/main.handlebars +++ b/public/views/main.handlebars @@ -119,9 +119,6 @@ tempElement = null; } const zackcheck = function( title, year ) { - //const years = [ 2000, 2003, 2004, 2006, 2009, 2010, 2011, 2013, 2016, 2019 ]; - //const titles = [ 'ROAD TRIP', 'OLD SCHOOL', 'STARSKY & HUTCH', 'SCHOOL FOR SCOUNDRELS', 'THE HANGOVER', - // 'DUE DATE', 'THE HANGOVER PART II', 'THE HANGOVER III', 'WAR DOGS', 'JOKER' ]; const years = [ 2004, 2007, 2009, 2010, 2011, 2013, 2016, 2017, 2021, 2021 ]; const titles = [ 'DAWN OF THE DEAD', '300', 'WATCHMEN', 'LEGEND OF THE GUARDIANS: THE OWLS OF GA\'HOOLE', 'SUCKER PUNCH', 'MAN OF STEEL', 'BATMAN V SUPERMAN: DAWN OF JUSTICE', 'JUSTICE LEAGUE', diff --git a/server.js b/server.js index c12ee1e36..d4abb2856 100644 --- a/server.js +++ b/server.js @@ -54,27 +54,26 @@ app.get('/auth/github/callback', passport.authenticate('github', { failureRedire function(req, res) { res.render( "main", { msg: "", layout: false } ); } ); app.get('/data', checkAuth, ( req, res ) => { - collection.find({ id:mongodb.ObjectId() }) - .project({ id: 0, items: 1 }).toArray() + collection.find({ _id:mongodb.ObjectId( req.session.passport.user ) }) + .project({ _id: 0, items: 1 }).toArray() .then( result => res.json( result ) ); }); app.post('/submit', checkAuth, ( req, res ) => { - let body = { id: mongodb.ObjectId(), title: req.body.title, genre: req.body.genre, year: req.body.year }; - collection.updateOne({ id: mongodb.ObjectId() }, - { $push: { items: body } }) + let body = { _movID: mongodb.ObjectId(), title: req.body.title, genre: req.body.genre, year: req.body.year }; + collection.updateOne({ _id: mongodb.ObjectId( req.session.passport.user ) }, { $push: { items: body } }) .then( result => res.json( result ) ); }); app.post('/delete', checkAuth, ( req, res ) => { - collection.updateOne({ id: mongodb.ObjectId() }, - { $pull: { items: { id: mongodb.ObjectId( req.body.id ) } } }) + collection.updateOne({ _id: mongodb.ObjectId( req.session.passport.user ) }, + { $pull: { items: { _movID: mongodb.ObjectId( req.body._movID ) } } }) .then( result => res.json( result ) ); }); app.post('/update', checkAuth, ( req, res ) => { - let changer = { id: mongodb.ObjectId( req.body.id ), title: req.body.title, genre: req.body.genre, year: req.body.year }; - collection.updateOne({ id: mongodb.ObjectId(), "items.id":mongodb.ObjectId( req.body.id ) }, + let changer = { _movID: mongodb.ObjectId( req.body._movID ), title: req.body.title, genre: req.body.genre, year: req.body.year }; + collection.updateOne({ _id: mongodb.ObjectId(), "items._movID":mongodb.ObjectId( req.body._movID ) }, { $set: "items.$", changer }) .then( result => res.json( result ) ); }); From 0f62c2446c437e473d5103245bd9244efc08b945 Mon Sep 17 00:00:00 2001 From: hyoder Date: Mon, 26 Sep 2022 15:01:49 -0400 Subject: [PATCH 46/92] commit --- public/views/main.handlebars | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/public/views/main.handlebars b/public/views/main.handlebars index 53e670702..3bac68ef0 100644 --- a/public/views/main.handlebars +++ b/public/views/main.handlebars @@ -7,6 +7,7 @@ +
@@ -44,13 +45,13 @@ tbl.innerHTML = 'titlegenreyeardirected by Zack Snyder?edit?delete?'; json.forEach(entry => { - let newRow = ''; + let newRow = ''; newRow += '' + entry.title.toString().toUpperCase() + ''; newRow += '' + entry.genre.toString().toUpperCase() + ''; newRow += '' + entry.year + ''; newRow += '' + zackcheck( entry.title, entry.year ) + ''; - newRow += ''; - newRow += ''; + newRow += ''; + newRow += ''; datatable.innerHTML += newRow; }); }; @@ -66,21 +67,21 @@ .then(dothething()); return false; }; - function deleter( id ) + function deleter( _movID ) { - const json = { id: x.id }, + const json = { _movID: x._movID }, body = JSON.stringify( json ); fetch( '/delete', { method: 'POST', headers: { "Content-Type": "application/json" }, body } ) .then( response => { response.json() }) .then( dothething() ); return false; }; - function updater( id, title, genre, year ) + function updater( _movID, title, genre, year ) { if( tempElement != null && tempID != null ) { updatercanceller( tempID ); } - tempID = id; + tempID = _movID; tempElement = document.getElementById('row-'+id); - let newRow = '' + id + ''; + let newRow = '' + _movID + ''; newRow += '' newRow += '' newRow += '' @@ -88,7 +89,7 @@ newRow += ''; - newRow += ''; + newRow += ''; + newRow += ''; tempElement.innerHTML = newRow; tempElement = null; tempID = null; }; - function updatersubmitter( id ) + function updatersubmitter( _movID ) { - const json = { id: id, - title: document.getElementById('title-'+id).value, - genre: document.getElementById('genre-'+id).value, - year: document.getElementById( 'year-'+id).value + const json = { _movID: _movID, + title: document.getElementById('title-'+_movID).value, + genre: document.getElementById('genre-'+_movID).value, + year: document.getElementById( 'year-'+_movID).value }, body = JSON.stringify(json); fetch( '/update', { method: 'POST', headers: { "Content-Type": "application/json" }, body }) From c1ddc201d91cc86531ae7ea798099cf77bb77857 Mon Sep 17 00:00:00 2001 From: hyoder Date: Mon, 26 Sep 2022 15:04:13 -0400 Subject: [PATCH 47/92] commit --- public/.DS_Store | Bin 8196 -> 8196 bytes public/{ => js}/scripts.js | 0 public/views/main.handlebars | 2 +- 3 files changed, 1 insertion(+), 1 deletion(-) rename public/{ => js}/scripts.js (100%) diff --git a/public/.DS_Store b/public/.DS_Store index f312889a251bc796a0103ba6b27decb8a5d42193..6c6576d3063ebcc8549532d6ec76a1bb46fd42b2 100644 GIT binary patch delta 288 zcmZp1XmOa}&&aniU^hP_-)0^G2lo1$bi?4}{M-Tt1YlywVkpkdcX3I|$xi|bb4c8& zuM;mk;s|6z - +
From d9dd6042720eb244f33df6b5655c016a780ee8d4 Mon Sep 17 00:00:00 2001 From: hyoder Date: Mon, 26 Sep 2022 15:06:23 -0400 Subject: [PATCH 48/92] commit --- public/.DS_Store | Bin 8196 -> 8196 bytes public/{js => }/scripts.js | 0 public/views/main.handlebars | 2 +- 3 files changed, 1 insertion(+), 1 deletion(-) rename public/{js => }/scripts.js (100%) diff --git a/public/.DS_Store b/public/.DS_Store index 6c6576d3063ebcc8549532d6ec76a1bb46fd42b2..d820a1b210343b22719776a70c9881f906922323 100644 GIT binary patch delta 38 ocmZp1XmOa}&&ahgU^hP_*Jd68Yxc?O#Umy*WNc=aaDcK?0q~^^!~g&Q delta 288 zcmZp1XmOa}&&aniU^hP_-)0^GYxa63hAf8SoOHwB cs4241 a3 + -
From a230b1c781f2662e00009d891c8c7ba46468d92e Mon Sep 17 00:00:00 2001 From: hyoder Date: Mon, 26 Sep 2022 15:07:54 -0400 Subject: [PATCH 49/92] commit --- public/views/main.handlebars | 102 ----------------------------------- 1 file changed, 102 deletions(-) diff --git a/public/views/main.handlebars b/public/views/main.handlebars index db1547d6e..f0c245c33 100644 --- a/public/views/main.handlebars +++ b/public/views/main.handlebars @@ -31,107 +31,5 @@
- From 7fcc63a09265ea91d1dd76925cc2658278f31945 Mon Sep 17 00:00:00 2001 From: hyoder Date: Mon, 26 Sep 2022 15:10:28 -0400 Subject: [PATCH 50/92] commit --- public/scripts.js | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/public/scripts.js b/public/scripts.js index 4706b1c6d..8d93080f8 100644 --- a/public/scripts.js +++ b/public/scripts.js @@ -9,17 +9,21 @@ function builder ( json ) { const tbl = document.getElementById( 'datatable' ); tbl.innerHTML = 'titlegenreyeardirected by Zack Snyder?edit?delete?'; - json.forEach(entry => + if( json != null ) { - let newRow = ''; - newRow += '' + entry.title.toString().toUpperCase() + ''; - newRow += '' + entry.genre.toString().toUpperCase() + ''; - newRow += '' + entry.year + ''; - newRow += '' + zackcheck( entry.title, entry.year ) + ''; - newRow += ''; - newRow += ''; - datatable.innerHTML += newRow; - }); + console.log('ok!'); + json.forEach(entry => + { + let newRow = ''; + newRow += '' + entry.title.toString().toUpperCase() + ''; + newRow += '' + entry.genre.toString().toUpperCase() + ''; + newRow += '' + entry.year + ''; + newRow += '' + zackcheck( entry.title, entry.year ) + ''; + newRow += ''; + newRow += ''; + datatable.innerHTML += newRow; + }); + } }; function submitter( e ) { From 8d2790560ba97eb604ef126602f2b9d7aabc0d31 Mon Sep 17 00:00:00 2001 From: hyoder Date: Mon, 26 Sep 2022 15:16:26 -0400 Subject: [PATCH 51/92] commit --- public/scripts.js | 1 + 1 file changed, 1 insertion(+) diff --git a/public/scripts.js b/public/scripts.js index 8d93080f8..aa19ef1d9 100644 --- a/public/scripts.js +++ b/public/scripts.js @@ -9,6 +9,7 @@ function builder ( json ) { const tbl = document.getElementById( 'datatable' ); tbl.innerHTML = 'titlegenreyeardirected by Zack Snyder?edit?delete?'; + console.log('ok?'); if( json != null ) { console.log('ok!'); From c36551d7c81fd47374ebe379135303c9571eb142 Mon Sep 17 00:00:00 2001 From: hyoder Date: Mon, 26 Sep 2022 15:28:18 -0400 Subject: [PATCH 52/92] commit --- public/scripts.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/scripts.js b/public/scripts.js index aa19ef1d9..e51f1a07b 100644 --- a/public/scripts.js +++ b/public/scripts.js @@ -3,7 +3,7 @@ function dothething() { fetch('/data', { method: 'GET', headers: { "Content-Type": "application/json" } }) .then( response => response.json() ) - .then( json => builder( json[ 0 ].entries )); + .then( json => builder( json[ 0 ].items )); }; function builder ( json ) { From 25ed5874eca9f45b5b64010524715c34e21185e2 Mon Sep 17 00:00:00 2001 From: hyoder Date: Mon, 26 Sep 2022 15:31:29 -0400 Subject: [PATCH 53/92] commit --- public/scripts.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/public/scripts.js b/public/scripts.js index e51f1a07b..23755efc6 100644 --- a/public/scripts.js +++ b/public/scripts.js @@ -20,7 +20,7 @@ function builder ( json ) newRow += '' + entry.genre.toString().toUpperCase() + ''; newRow += '' + entry.year + ''; newRow += '' + zackcheck( entry.title, entry.year ) + ''; - newRow += ''; + newRow += ''; newRow += ''; datatable.innerHTML += newRow; }); @@ -56,8 +56,8 @@ function updater( _movID, title, genre, year ) newRow += '' newRow += '' newRow += '' - newRow += ''; + newRow += ''; tempElement.innerHTML = newRow; }; function updatercanceller( _movID ) From 038cb1b4a3d7f4814e05cb0fcd66391f85423f07 Mon Sep 17 00:00:00 2001 From: hyoder Date: Mon, 26 Sep 2022 15:31:44 -0400 Subject: [PATCH 54/92] commit --- public/scripts.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/scripts.js b/public/scripts.js index 23755efc6..295d65636 100644 --- a/public/scripts.js +++ b/public/scripts.js @@ -51,7 +51,7 @@ function updater( _movID, title, genre, year ) { if( tempElement != null && tempID != null ) { updatercanceller( tempID ); } tempID = _movID; - tempElement = document.getElementById('row-'+id); + tempElement = document.getElementById('row-'+_movID); let newRow = '' + _movID + ''; newRow += '' newRow += '' From 33562b7f815d389da68c06fa645507cb4f755db6 Mon Sep 17 00:00:00 2001 From: hyoder Date: Mon, 26 Sep 2022 15:33:58 -0400 Subject: [PATCH 55/92] commit --- public/scripts.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/scripts.js b/public/scripts.js index 295d65636..ac78bd356 100644 --- a/public/scripts.js +++ b/public/scripts.js @@ -56,8 +56,8 @@ function updater( _movID, title, genre, year ) newRow += '' newRow += '' newRow += '' - newRow += ''; + newRow += ''; tempElement.innerHTML = newRow; }; function updatercanceller( _movID ) From b9b31c27eb304d48094f4985e996baf1f5d95cc2 Mon Sep 17 00:00:00 2001 From: hyoder Date: Mon, 26 Sep 2022 15:36:44 -0400 Subject: [PATCH 56/92] commit --- public/scripts.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/scripts.js b/public/scripts.js index ac78bd356..ead7c880d 100644 --- a/public/scripts.js +++ b/public/scripts.js @@ -20,8 +20,8 @@ function builder ( json ) newRow += '' + entry.genre.toString().toUpperCase() + ''; newRow += '' + entry.year + ''; newRow += '' + zackcheck( entry.title, entry.year ) + ''; - newRow += ''; - newRow += ''; + newRow += ''; + newRow += ''; datatable.innerHTML += newRow; }); } From 0936a06101c0702de4b116a1aa2b38d59be60dcf Mon Sep 17 00:00:00 2001 From: hyoder Date: Mon, 26 Sep 2022 15:38:04 -0400 Subject: [PATCH 57/92] commit --- public/scripts.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/scripts.js b/public/scripts.js index ead7c880d..cbb9e32b8 100644 --- a/public/scripts.js +++ b/public/scripts.js @@ -40,7 +40,7 @@ function submitter( e ) }; function deleter( _movID ) { - const json = { _movID: x._movID }, + const json = { _movID: _movID }, body = JSON.stringify( json ); fetch( '/delete', { method: 'POST', headers: { "Content-Type": "application/json" }, body } ) .then( response => { response.json() }) From 8c043bef032ac6f7d4ea7e2616ec14524e176285 Mon Sep 17 00:00:00 2001 From: hyoder Date: Mon, 26 Sep 2022 15:42:43 -0400 Subject: [PATCH 58/92] commit --- public/scripts.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/public/scripts.js b/public/scripts.js index cbb9e32b8..188805018 100644 --- a/public/scripts.js +++ b/public/scripts.js @@ -51,13 +51,13 @@ function updater( _movID, title, genre, year ) { if( tempElement != null && tempID != null ) { updatercanceller( tempID ); } tempID = _movID; - tempElement = document.getElementById('row-'+_movID); - let newRow = '' + _movID + ''; + tempElement = document.getElementById(_movID); + let newRow = ''; newRow += '' newRow += '' newRow += '' newRow += ''; + newRow += ''; - newRow += ''; + newRow += ''; tempElement.innerHTML = newRow; tempElement = null; tempID = null; From 22eabc39e4af66753914af8605b918e18af19de4 Mon Sep 17 00:00:00 2001 From: hyoder Date: Mon, 26 Sep 2022 15:46:08 -0400 Subject: [PATCH 59/92] commit --- public/scripts.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/scripts.js b/public/scripts.js index 188805018..f292891d1 100644 --- a/public/scripts.js +++ b/public/scripts.js @@ -56,8 +56,8 @@ function updater( _movID, title, genre, year ) newRow += '' newRow += '' newRow += '' - newRow += ''; + newRow += ''; + newRow += ''; tempElement.innerHTML = newRow; }; function updatercanceller( _movID ) From 43b2894a99de72b4d718f167070de1bc9b035efc Mon Sep 17 00:00:00 2001 From: hyoder Date: Mon, 26 Sep 2022 15:47:56 -0400 Subject: [PATCH 60/92] commit --- public/scripts.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/public/scripts.js b/public/scripts.js index f292891d1..7427125e5 100644 --- a/public/scripts.js +++ b/public/scripts.js @@ -56,8 +56,9 @@ function updater( _movID, title, genre, year ) newRow += '' newRow += '' newRow += '' - newRow += ''; + newRow += ''; newRow += ''; + newRow += ''; tempElement.innerHTML = newRow; }; function updatercanceller( _movID ) From 644830fbcfcbeb3cec653635f2fe7e527bae44bc Mon Sep 17 00:00:00 2001 From: hyoder Date: Mon, 26 Sep 2022 15:50:36 -0400 Subject: [PATCH 61/92] commit --- public/scripts.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/public/scripts.js b/public/scripts.js index 7427125e5..0a6f9fdd0 100644 --- a/public/scripts.js +++ b/public/scripts.js @@ -57,7 +57,7 @@ function updater( _movID, title, genre, year ) newRow += '' newRow += '' newRow += ''; - newRow += ''; + newRow += ''; newRow += ''; tempElement.innerHTML = newRow; }; @@ -71,8 +71,8 @@ function updatercanceller( _movID ) newRow += '' + genre + ''; newRow += '' + year + ''; newRow += '' + zackCheck(title, genre) + '<\th>'; - newRow += ''; - newRow += ''; + newRow += ''; + newRow += ''; tempElement.innerHTML = newRow; tempElement = null; tempID = null; From 58b394363309d349932c3f165ddd512665a4a583 Mon Sep 17 00:00:00 2001 From: hyoder Date: Mon, 26 Sep 2022 15:53:03 -0400 Subject: [PATCH 62/92] commit --- public/scripts.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/public/scripts.js b/public/scripts.js index 0a6f9fdd0..eca3dbc0c 100644 --- a/public/scripts.js +++ b/public/scripts.js @@ -80,9 +80,9 @@ function updatercanceller( _movID ) function updatersubmitter( _movID ) { const json = { _movID: _movID, - title: document.getElementById('title-'+id).value, - genre: document.getElementById('genre-'+id).value, - year: document.getElementById( 'year-'+id).value + title: document.getElementById( 'title-'+_movID ).value, + genre: document.getElementById( 'genre-'+_movID ).value, + year: document.getElementById( 'year-'+_movID ).value }, body = JSON.stringify(json); fetch( '/update', { method: 'POST', headers: { "Content-Type": "application/json" }, body }) From 2288a23f15be0a1827cb71336733410b2bd8f420 Mon Sep 17 00:00:00 2001 From: hyoder Date: Mon, 26 Sep 2022 15:53:17 -0400 Subject: [PATCH 63/92] commit --- public/scripts.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/scripts.js b/public/scripts.js index eca3dbc0c..0b3d3da9e 100644 --- a/public/scripts.js +++ b/public/scripts.js @@ -70,7 +70,7 @@ function updatercanceller( _movID ) newRow += '' + title + ''; newRow += '' + genre + ''; newRow += '' + year + ''; - newRow += '' + zackCheck(title, genre) + '<\th>'; + newRow += '' + zackcheck(title, genre) + '<\th>'; newRow += ''; newRow += ''; tempElement.innerHTML = newRow; From 708e30899bfce8f33ab6374ead44282c6b00b0be Mon Sep 17 00:00:00 2001 From: hyoder Date: Mon, 26 Sep 2022 15:57:35 -0400 Subject: [PATCH 64/92] commit --- public/scripts.js | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/public/scripts.js b/public/scripts.js index 0b3d3da9e..7be7929d6 100644 --- a/public/scripts.js +++ b/public/scripts.js @@ -58,21 +58,22 @@ function updater( _movID, title, genre, year ) newRow += '' newRow += ''; newRow += ''; - newRow += ''; + newRow += ''; tempElement.innerHTML = newRow; }; -function updatercanceller( _movID ) +function updatercanceller() { - let title = document.getElementById( 'title-${tempID}' ).value, - genre = document.getElementById( 'genre-${tempID}' ).value, - year = document.getElementById( 'year-${tempID}' ).value, - newRow = ''; + let id = tempID, + title = tempElement.title, + genre = tempElement.genre, + year = tempElement.year, + newRow = ''; newRow += '' + title + ''; newRow += '' + genre + ''; newRow += '' + year + ''; newRow += '' + zackcheck(title, genre) + '<\th>'; - newRow += ''; - newRow += ''; + newRow += ''; + newRow += ''; tempElement.innerHTML = newRow; tempElement = null; tempID = null; From 81fdf23cdb251dc6a30705e452e8045da70b8b38 Mon Sep 17 00:00:00 2001 From: hyoder Date: Mon, 26 Sep 2022 16:01:15 -0400 Subject: [PATCH 65/92] commit --- public/scripts.js | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/public/scripts.js b/public/scripts.js index 7be7929d6..47cb5d437 100644 --- a/public/scripts.js +++ b/public/scripts.js @@ -58,22 +58,22 @@ function updater( _movID, title, genre, year ) newRow += '' newRow += ''; newRow += ''; - newRow += ''; + newRow += ''; tempElement.innerHTML = newRow; }; -function updatercanceller() +function updatercanceller( _movID ) { - let id = tempID, - title = tempElement.title, - genre = tempElement.genre, - year = tempElement.year, + let element = document.getElementById( _movID ), + title = element.title, + genre = element.genre, + year = element.year, newRow = ''; newRow += '' + title + ''; newRow += '' + genre + ''; newRow += '' + year + ''; newRow += '' + zackcheck(title, genre) + '<\th>'; - newRow += ''; - newRow += ''; + newRow += ''; + newRow += ''; tempElement.innerHTML = newRow; tempElement = null; tempID = null; @@ -81,9 +81,9 @@ function updatercanceller() function updatersubmitter( _movID ) { const json = { _movID: _movID, - title: document.getElementById( 'title-'+_movID ).value, - genre: document.getElementById( 'genre-'+_movID ).value, - year: document.getElementById( 'year-'+_movID ).value + title: document.getElementById( _movID ).title, + genre: document.getElementById( _movID ).genre, + year: document.getElementById( _movID ).year }, body = JSON.stringify(json); fetch( '/update', { method: 'POST', headers: { "Content-Type": "application/json" }, body }) From 7c7f90bd5efac15a9fae6a8984c1d53fdcf6b95d Mon Sep 17 00:00:00 2001 From: hyoder Date: Mon, 26 Sep 2022 16:06:16 -0400 Subject: [PATCH 66/92] commit --- public/scripts.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/public/scripts.js b/public/scripts.js index 47cb5d437..22771de34 100644 --- a/public/scripts.js +++ b/public/scripts.js @@ -67,7 +67,7 @@ function updatercanceller( _movID ) title = element.title, genre = element.genre, year = element.year, - newRow = ''; + newRow = ''; newRow += '' + title + ''; newRow += '' + genre + ''; newRow += '' + year + ''; @@ -77,6 +77,7 @@ function updatercanceller( _movID ) tempElement.innerHTML = newRow; tempElement = null; tempID = null; + }; function updatersubmitter( _movID ) { From f7f10784c46ba0443052ccf84e28d0101a1f0184 Mon Sep 17 00:00:00 2001 From: hyoder Date: Mon, 26 Sep 2022 16:08:37 -0400 Subject: [PATCH 67/92] commit --- public/scripts.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/scripts.js b/public/scripts.js index 22771de34..3ac78de77 100644 --- a/public/scripts.js +++ b/public/scripts.js @@ -59,7 +59,7 @@ function updater( _movID, title, genre, year ) newRow += ''; newRow += ''; newRow += ''; - tempElement.innerHTML = newRow; + tempElement.innerHTML += newRow; }; function updatercanceller( _movID ) { From f92bd534b6bf5ed7992577b65479814aeef7277a Mon Sep 17 00:00:00 2001 From: hyoder Date: Mon, 26 Sep 2022 16:10:47 -0400 Subject: [PATCH 68/92] commit --- public/scripts.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/scripts.js b/public/scripts.js index 3ac78de77..2379fab01 100644 --- a/public/scripts.js +++ b/public/scripts.js @@ -52,7 +52,7 @@ function updater( _movID, title, genre, year ) if( tempElement != null && tempID != null ) { updatercanceller( tempID ); } tempID = _movID; tempElement = document.getElementById(_movID); - let newRow = ''; + let newRow = '
'; newRow += '' newRow += '' newRow += '' @@ -71,7 +71,7 @@ function updatercanceller( _movID ) newRow += '' + title + ''; newRow += '' + genre + ''; newRow += '' + year + ''; - newRow += '' + zackcheck(title, genre) + '<\th>'; + newRow += '' + zackcheck(title, genre) + ''; newRow += ''; newRow += ''; tempElement.innerHTML = newRow; From 33fcda3b7dd057966303fc28b6ace5cd2ad77e7a Mon Sep 17 00:00:00 2001 From: hyoder Date: Mon, 26 Sep 2022 16:13:12 -0400 Subject: [PATCH 69/92] commit --- public/scripts.js | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/public/scripts.js b/public/scripts.js index 2379fab01..1e1be6c71 100644 --- a/public/scripts.js +++ b/public/scripts.js @@ -63,10 +63,9 @@ function updater( _movID, title, genre, year ) }; function updatercanceller( _movID ) { - let element = document.getElementById( _movID ), - title = element.title, - genre = element.genre, - year = element.year, + let title = document.getElementById( _movID ).children[0], + genre = document.getElementById( _movID ).children[1], + year = document.getElementById( _movID ).children[2], newRow = ''; newRow += '' + title + ''; newRow += '' + genre + ''; @@ -82,9 +81,9 @@ function updatercanceller( _movID ) function updatersubmitter( _movID ) { const json = { _movID: _movID, - title: document.getElementById( _movID ).title, - genre: document.getElementById( _movID ).genre, - year: document.getElementById( _movID ).year + title: document.getElementById( _movID ).children[0], + genre: document.getElementById( _movID ).children[1], + year: document.getElementById( _movID ).children[2] }, body = JSON.stringify(json); fetch( '/update', { method: 'POST', headers: { "Content-Type": "application/json" }, body }) From ba8623d59daec0acdb5ac84f90d918c233476d6b Mon Sep 17 00:00:00 2001 From: hyoder Date: Mon, 26 Sep 2022 16:16:08 -0400 Subject: [PATCH 70/92] commit --- public/scripts.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/public/scripts.js b/public/scripts.js index 1e1be6c71..0f84a3ffd 100644 --- a/public/scripts.js +++ b/public/scripts.js @@ -63,9 +63,9 @@ function updater( _movID, title, genre, year ) }; function updatercanceller( _movID ) { - let title = document.getElementById( _movID ).children[0], - genre = document.getElementById( _movID ).children[1], - year = document.getElementById( _movID ).children[2], + let title = document.getElementById( _movID ).children[0].text, + genre = document.getElementById( _movID ).children[1].text, + year = document.getElementById( _movID ).children[2].text, newRow = ''; newRow += '' + title + ''; newRow += '' + genre + ''; @@ -81,9 +81,9 @@ function updatercanceller( _movID ) function updatersubmitter( _movID ) { const json = { _movID: _movID, - title: document.getElementById( _movID ).children[0], - genre: document.getElementById( _movID ).children[1], - year: document.getElementById( _movID ).children[2] + title: document.getElementById( _movID ).children[6], + genre: document.getElementById( _movID ).children[7], + year: document.getElementById( _movID ).children[8] }, body = JSON.stringify(json); fetch( '/update', { method: 'POST', headers: { "Content-Type": "application/json" }, body }) From 1ae2141b9ecd0a554f1f2c1779be1f56c9edd067 Mon Sep 17 00:00:00 2001 From: hyoder Date: Mon, 26 Sep 2022 16:19:30 -0400 Subject: [PATCH 71/92] commit --- public/scripts.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/scripts.js b/public/scripts.js index 0f84a3ffd..d6c88a4db 100644 --- a/public/scripts.js +++ b/public/scripts.js @@ -76,7 +76,7 @@ function updatercanceller( _movID ) tempElement.innerHTML = newRow; tempElement = null; tempID = null; - + console.log(title); }; function updatersubmitter( _movID ) { From 3371ada8f9e84a4332a6c22d3c64cb21f379d890 Mon Sep 17 00:00:00 2001 From: hyoder Date: Mon, 26 Sep 2022 16:21:06 -0400 Subject: [PATCH 72/92] commit --- public/scripts.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/public/scripts.js b/public/scripts.js index d6c88a4db..97ddbcd99 100644 --- a/public/scripts.js +++ b/public/scripts.js @@ -65,8 +65,9 @@ function updatercanceller( _movID ) { let title = document.getElementById( _movID ).children[0].text, genre = document.getElementById( _movID ).children[1].text, - year = document.getElementById( _movID ).children[2].text, - newRow = ''; + year = document.getElementById( _movID ).children[2].text; + console.log(title); + let newRow = ''; newRow += '' + title + ''; newRow += '' + genre + ''; newRow += '' + year + ''; @@ -76,7 +77,6 @@ function updatercanceller( _movID ) tempElement.innerHTML = newRow; tempElement = null; tempID = null; - console.log(title); }; function updatersubmitter( _movID ) { From d1a2198fb105b44765696475862a3774cca6b917 Mon Sep 17 00:00:00 2001 From: hyoder Date: Mon, 26 Sep 2022 16:21:48 -0400 Subject: [PATCH 73/92] commit --- public/scripts.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/public/scripts.js b/public/scripts.js index 97ddbcd99..33c83d21b 100644 --- a/public/scripts.js +++ b/public/scripts.js @@ -63,9 +63,9 @@ function updater( _movID, title, genre, year ) }; function updatercanceller( _movID ) { - let title = document.getElementById( _movID ).children[0].text, - genre = document.getElementById( _movID ).children[1].text, - year = document.getElementById( _movID ).children[2].text; + let title = document.getElementById( _movID ).children[0].innerHTML, + genre = document.getElementById( _movID ).children[1].innerHTML, + year = document.getElementById( _movID ).children[2].innerHTML; console.log(title); let newRow = ''; newRow += '' + title + ''; From 7344cff3e4f2c7c0048568726059785e712eb04b Mon Sep 17 00:00:00 2001 From: hyoder Date: Mon, 26 Sep 2022 16:24:15 -0400 Subject: [PATCH 74/92] commit --- public/scripts.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/public/scripts.js b/public/scripts.js index 33c83d21b..797a55c3e 100644 --- a/public/scripts.js +++ b/public/scripts.js @@ -81,9 +81,9 @@ function updatercanceller( _movID ) function updatersubmitter( _movID ) { const json = { _movID: _movID, - title: document.getElementById( _movID ).children[6], - genre: document.getElementById( _movID ).children[7], - year: document.getElementById( _movID ).children[8] + title: document.getElementById( _movID ).children[6].value, + genre: document.getElementById( _movID ).children[7].value, + year: document.getElementById( _movID ).children[8].value }, body = JSON.stringify(json); fetch( '/update', { method: 'POST', headers: { "Content-Type": "application/json" }, body }) From 34b0eb1d5f36aa1592bf1b9d7f720ddcb62e65b1 Mon Sep 17 00:00:00 2001 From: hyoder Date: Mon, 26 Sep 2022 16:28:12 -0400 Subject: [PATCH 75/92] commit --- server.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server.js b/server.js index d4abb2856..da24e59c7 100644 --- a/server.js +++ b/server.js @@ -73,7 +73,7 @@ app.post('/delete', checkAuth, ( req, res ) => app.post('/update', checkAuth, ( req, res ) => { let changer = { _movID: mongodb.ObjectId( req.body._movID ), title: req.body.title, genre: req.body.genre, year: req.body.year }; - collection.updateOne({ _id: mongodb.ObjectId(), "items._movID":mongodb.ObjectId( req.body._movID ) }, + collection.updateOne({ _id: mongodb.ObjectId( req.session.passport.user ), "items._movID":mongodb.ObjectId( req.body._movID ) }, { $set: "items.$", changer }) .then( result => res.json( result ) ); }); From a7274fd839dc46593c81a47a3ad087fdaf9cf9d1 Mon Sep 17 00:00:00 2001 From: hyoder Date: Mon, 26 Sep 2022 16:33:24 -0400 Subject: [PATCH 76/92] commit --- public/scripts.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/public/scripts.js b/public/scripts.js index 797a55c3e..eab3211a6 100644 --- a/public/scripts.js +++ b/public/scripts.js @@ -65,9 +65,8 @@ function updatercanceller( _movID ) { let title = document.getElementById( _movID ).children[0].innerHTML, genre = document.getElementById( _movID ).children[1].innerHTML, - year = document.getElementById( _movID ).children[2].innerHTML; - console.log(title); - let newRow = ''; + year = document.getElementById( _movID ).children[2].innerHTML, + newRow = ''; newRow += '' + title + ''; newRow += '' + genre + ''; newRow += '' + year + ''; @@ -86,6 +85,7 @@ function updatersubmitter( _movID ) year: document.getElementById( _movID ).children[8].value }, body = JSON.stringify(json); + console.log( body ); fetch( '/update', { method: 'POST', headers: { "Content-Type": "application/json" }, body }) .then( response => response.json() ) .then( dothething() ); From ad44cec658e77382c1be350ece8c717a82143a22 Mon Sep 17 00:00:00 2001 From: hyoder Date: Mon, 26 Sep 2022 16:36:50 -0400 Subject: [PATCH 77/92] commit --- public/scripts.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/public/scripts.js b/public/scripts.js index eab3211a6..ecac80744 100644 --- a/public/scripts.js +++ b/public/scripts.js @@ -80,12 +80,14 @@ function updatercanceller( _movID ) function updatersubmitter( _movID ) { const json = { _movID: _movID, - title: document.getElementById( _movID ).children[6].value, - genre: document.getElementById( _movID ).children[7].value, - year: document.getElementById( _movID ).children[8].value + title: document.getElementById( _movID ).children[6].innerHTML, + genre: document.getElementById( _movID ).children[7].innerHTML, + year: document.getElementById( _movID ).children[8].innerHTML }, body = JSON.stringify(json); + console.log( json.title ); console.log( body ); + console.log( document.getElementById( _movID ).children ); fetch( '/update', { method: 'POST', headers: { "Content-Type": "application/json" }, body }) .then( response => response.json() ) .then( dothething() ); From 3009b1d066cb97431b8be3dc26abf66522a82e28 Mon Sep 17 00:00:00 2001 From: hyoder Date: Mon, 26 Sep 2022 16:39:40 -0400 Subject: [PATCH 78/92] commit --- public/scripts.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/public/scripts.js b/public/scripts.js index ecac80744..d74d984ee 100644 --- a/public/scripts.js +++ b/public/scripts.js @@ -80,9 +80,9 @@ function updatercanceller( _movID ) function updatersubmitter( _movID ) { const json = { _movID: _movID, - title: document.getElementById( _movID ).children[6].innerHTML, - genre: document.getElementById( _movID ).children[7].innerHTML, - year: document.getElementById( _movID ).children[8].innerHTML + title: document.getElementById( _movID ).children[7].children[0].value, + genre: document.getElementById( _movID ).children[8].children[0].value, + year: document.getElementById( _movID ).children[9].children[0].value }, body = JSON.stringify(json); console.log( json.title ); From 4e4bbc9e3b98bb283b24803661c815f9de141f08 Mon Sep 17 00:00:00 2001 From: hyoder Date: Mon, 26 Sep 2022 22:17:05 -0400 Subject: [PATCH 79/92] commit --- server.js | 1 + 1 file changed, 1 insertion(+) diff --git a/server.js b/server.js index da24e59c7..9307f200d 100644 --- a/server.js +++ b/server.js @@ -73,6 +73,7 @@ app.post('/delete', checkAuth, ( req, res ) => app.post('/update', checkAuth, ( req, res ) => { let changer = { _movID: mongodb.ObjectId( req.body._movID ), title: req.body.title, genre: req.body.genre, year: req.body.year }; + console.log(changer); collection.updateOne({ _id: mongodb.ObjectId( req.session.passport.user ), "items._movID":mongodb.ObjectId( req.body._movID ) }, { $set: "items.$", changer }) .then( result => res.json( result ) ); From c247b779d5f617d9e1922ac938647f90fc846d89 Mon Sep 17 00:00:00 2001 From: hyoder Date: Mon, 26 Sep 2022 22:32:42 -0400 Subject: [PATCH 80/92] commit --- public/scripts.js | 48 +++++++++++++++++++++++++++-------------------- 1 file changed, 28 insertions(+), 20 deletions(-) diff --git a/public/scripts.js b/public/scripts.js index d74d984ee..8a66f5ef1 100644 --- a/public/scripts.js +++ b/public/scripts.js @@ -49,17 +49,17 @@ function deleter( _movID ) }; function updater( _movID, title, genre, year ) { - if( tempElement != null && tempID != null ) { updatercanceller( tempID ); } - tempID = _movID; - tempElement = document.getElementById(_movID); - let newRow = '
'; - newRow += '' - newRow += '' - newRow += '' + //Element != null && tempID != null ) { updatercanceller( tempID ); } + //tempID = _movID; + //tempElement = document.getElementById(_movID); + let newRow = ''; + newRow += '' + newRow += '' + newRow += '' newRow += ''; newRow += ''; newRow += ''; - tempElement.innerHTML += newRow; + document.getElementById( _movID ).innerHTML += newRow; }; function updatercanceller( _movID ) { @@ -69,30 +69,38 @@ function updatercanceller( _movID ) newRow = ''; newRow += '' + title + ''; newRow += '' + genre + ''; - newRow += '' + year + ''; + newRow += '' + year + ''; newRow += '' + zackcheck(title, genre) + ''; newRow += ''; newRow += ''; - tempElement.innerHTML = newRow; - tempElement = null; - tempID = null; + document.getElementById( _movID ).innerHTML = newRow; + //tempElement.innerHTML = newRow; + //tempElement = null; + //tempID = null; }; function updatersubmitter( _movID ) { - const json = { _movID: _movID, - title: document.getElementById( _movID ).children[7].children[0].value, - genre: document.getElementById( _movID ).children[8].children[0].value, - year: document.getElementById( _movID ).children[9].children[0].value - }, + let oldtitle = document.getElementById( _movID ).children[0].innerHTML, + newtitle = document.getElementById( 'titleedit' + oldtitle ), + newgenre = document.getElementById( 'genreedit' + oldtitle ), + newyear = document.getElementById( 'yearedit' + oldtitle ), + newrow = ''; + newrow += '' + newtitle + ''; + newrow += '' + newgenre + ''; + newrow += '' + newyear + ''; + newrow += '' + zackcheck(newtitle, newgenre) + ''; + newRow += ''; + newRow += ''; + /*const json = { _movID: _movID, title: newtitle, genre: newgenre, year: newyear }, body = JSON.stringify(json); console.log( json.title ); console.log( body ); console.log( document.getElementById( _movID ).children ); fetch( '/update', { method: 'POST', headers: { "Content-Type": "application/json" }, body }) .then( response => response.json() ) - .then( dothething() ); - tempID = null; - tempElement = null; + .then( dothething() );*/ + //tempID = null; + //tempElement = null; } const zackcheck = function( title, year ) { const years = [ 2004, 2007, 2009, 2010, 2011, 2013, 2016, 2017, 2021, 2021 ]; From 1f78aa1668df77e2472e24f8c9f0c7d967618be9 Mon Sep 17 00:00:00 2001 From: hyoder Date: Mon, 26 Sep 2022 22:39:45 -0400 Subject: [PATCH 81/92] commit --- public/scripts.js | 51 ++++++++++++++++++++++++----------------------- 1 file changed, 26 insertions(+), 25 deletions(-) diff --git a/public/scripts.js b/public/scripts.js index 8a66f5ef1..a94606b43 100644 --- a/public/scripts.js +++ b/public/scripts.js @@ -49,17 +49,17 @@ function deleter( _movID ) }; function updater( _movID, title, genre, year ) { - //Element != null && tempID != null ) { updatercanceller( tempID ); } - //tempID = _movID; - //tempElement = document.getElementById(_movID); - let newRow = ''; + if( tempElement != null && tempID != null ) { updatercanceller( tempID ); } + tempID = _movID; + tempElement = document.getElementById(_movID); + let newRow = '
'; newRow += '' newRow += '' newRow += '' newRow += ''; newRow += ''; newRow += ''; - document.getElementById( _movID ).innerHTML += newRow; + tempElement.innerHTML += newRow; }; function updatercanceller( _movID ) { @@ -69,38 +69,39 @@ function updatercanceller( _movID ) newRow = ''; newRow += '' + title + ''; newRow += '' + genre + ''; - newRow += '' + year + ''; + newRow += '' + year + ''; newRow += '' + zackcheck(title, genre) + ''; newRow += ''; newRow += ''; - document.getElementById( _movID ).innerHTML = newRow; - //tempElement.innerHTML = newRow; - //tempElement = null; - //tempID = null; + tempElement.innerHTML = newRow; + tempElement = null; + tempID = null; }; function updatersubmitter( _movID ) { - let oldtitle = document.getElementById( _movID ).children[0].innerHTML, - newtitle = document.getElementById( 'titleedit' + oldtitle ), - newgenre = document.getElementById( 'genreedit' + oldtitle ), - newyear = document.getElementById( 'yearedit' + oldtitle ), - newrow = ''; - newrow += '' + newtitle + ''; - newrow += '' + newgenre + ''; - newrow += '' + newyear + ''; - newrow += '' + zackcheck(newtitle, newgenre) + ''; - newRow += ''; - newRow += ''; - /*const json = { _movID: _movID, title: newtitle, genre: newgenre, year: newyear }, + const json = { _movID: _movID, + title: document.getElementById( _movID ).children[7].children[0].value, + genre: document.getElementById( _movID ).children[8].children[0].value, + year: document.getElementById( _movID ).children[9].children[0].value + }, body = JSON.stringify(json); console.log( json.title ); console.log( body ); console.log( document.getElementById( _movID ).children ); + newrow = ''; + newrow += '' + json.title + ''; + newrow += '' + json.genre + ''; + newrow += '' + json.year + ''; + newrow += '' + zackcheck( json.title, json.genre ) + ''; + newRow += ''; + newRow += ''; + console.log( newrow ); + tempElement.innerHTML = newrow; fetch( '/update', { method: 'POST', headers: { "Content-Type": "application/json" }, body }) .then( response => response.json() ) - .then( dothething() );*/ - //tempID = null; - //tempElement = null; + .then( dothething() ); + tempID = null; + tempElement = null; } const zackcheck = function( title, year ) { const years = [ 2004, 2007, 2009, 2010, 2011, 2013, 2016, 2017, 2021, 2021 ]; From c1390aa0d4caee41253dff016f5366a2f5415aa1 Mon Sep 17 00:00:00 2001 From: hyoder Date: Mon, 26 Sep 2022 22:42:17 -0400 Subject: [PATCH 82/92] commit --- public/scripts.js | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/public/scripts.js b/public/scripts.js index a94606b43..9ddc441b0 100644 --- a/public/scripts.js +++ b/public/scripts.js @@ -79,22 +79,23 @@ function updatercanceller( _movID ) }; function updatersubmitter( _movID ) { - const json = { _movID: _movID, - title: document.getElementById( _movID ).children[7].children[0].value, - genre: document.getElementById( _movID ).children[8].children[0].value, - year: document.getElementById( _movID ).children[9].children[0].value - }, - body = JSON.stringify(json); + const json = { _movID: _movID, + title: document.getElementById( _movID ).children[7].children[0].value, + genre: document.getElementById( _movID ).children[8].children[0].value, + year: document.getElementById( _movID ).children[9].children[0].value + }, + body = JSON.stringify(json), + newrow = ''; + newrow += '' + json.title + ''; + newrow += '' + json.genre + ''; + newrow += '' + json.year + ''; + newrow += '' + zackcheck( json.title, json.genre ) + ''; + newRow += ''; + newRow += ''; console.log( json.title ); console.log( body ); console.log( document.getElementById( _movID ).children ); - newrow = ''; - newrow += '' + json.title + ''; - newrow += '' + json.genre + ''; - newrow += '' + json.year + ''; - newrow += '' + zackcheck( json.title, json.genre ) + ''; - newRow += ''; - newRow += ''; + console.log( newrow ); tempElement.innerHTML = newrow; fetch( '/update', { method: 'POST', headers: { "Content-Type": "application/json" }, body }) From a64ed2bc2a5341c818bbc4f138127bca1c0e3529 Mon Sep 17 00:00:00 2001 From: hyoder Date: Mon, 26 Sep 2022 22:43:43 -0400 Subject: [PATCH 83/92] commit --- public/scripts.js | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/public/scripts.js b/public/scripts.js index 9ddc441b0..cf1782fda 100644 --- a/public/scripts.js +++ b/public/scripts.js @@ -79,23 +79,22 @@ function updatercanceller( _movID ) }; function updatersubmitter( _movID ) { - const json = { _movID: _movID, + let json = { _movID: _movID, title: document.getElementById( _movID ).children[7].children[0].value, genre: document.getElementById( _movID ).children[8].children[0].value, year: document.getElementById( _movID ).children[9].children[0].value }, - body = JSON.stringify(json), - newrow = ''; - newrow += '' + json.title + ''; - newrow += '' + json.genre + ''; - newrow += '' + json.year + ''; - newrow += '' + zackcheck( json.title, json.genre ) + ''; - newRow += ''; - newRow += ''; + body = JSON.stringify(json), + newrow = ''; + newrow += '' + json.title + ''; + newrow += '' + json.genre + ''; + newrow += '' + json.year + ''; + newrow += '' + zackcheck( json.title, json.genre ) + ''; + newRow += ''; + newRow += ''; console.log( json.title ); console.log( body ); console.log( document.getElementById( _movID ).children ); - console.log( newrow ); tempElement.innerHTML = newrow; fetch( '/update', { method: 'POST', headers: { "Content-Type": "application/json" }, body }) From 0eda61c297bffa121385762acb18f7b2a462a58a Mon Sep 17 00:00:00 2001 From: hyoder Date: Mon, 26 Sep 2022 22:45:02 -0400 Subject: [PATCH 84/92] commit --- public/scripts.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/scripts.js b/public/scripts.js index cf1782fda..f6b334532 100644 --- a/public/scripts.js +++ b/public/scripts.js @@ -90,8 +90,8 @@ function updatersubmitter( _movID ) newrow += '' + json.genre + ''; newrow += '' + json.year + ''; newrow += '' + zackcheck( json.title, json.genre ) + ''; - newRow += ''; - newRow += ''; + newrow += ''; + newrow += ''; console.log( json.title ); console.log( body ); console.log( document.getElementById( _movID ).children ); From 5da34e3bad5aaedb13f2aaf8f45470ea73a494a3 Mon Sep 17 00:00:00 2001 From: hyoder Date: Mon, 26 Sep 2022 22:51:16 -0400 Subject: [PATCH 85/92] commit --- public/scripts.js | 64 ++++++++++++++++++++--------------------------- 1 file changed, 27 insertions(+), 37 deletions(-) diff --git a/public/scripts.js b/public/scripts.js index f6b334532..9c5fd9868 100644 --- a/public/scripts.js +++ b/public/scripts.js @@ -1,4 +1,4 @@ -let tempID = null, tempElement = null; +let tempID = null, tempelement = null, temprow = null; function dothething() { fetch('/data', { method: 'GET', headers: { "Content-Type": "application/json" } }) @@ -33,7 +33,7 @@ function submitter( e ) year = document.getElementById('year'), json = { title: title.value, genre: genre.value, year: year.value }, body = JSON.stringify(json); - fetch('/submit', { method: 'POST', headers: { "Content-Type": "application/json" }, body }) + fetch( '/submit', { method: 'POST', headers: { "Content-Type": "application/json" }, body }) .then( response => response.json()) .then(dothething()); return false; @@ -49,33 +49,33 @@ function deleter( _movID ) }; function updater( _movID, title, genre, year ) { - if( tempElement != null && tempID != null ) { updatercanceller( tempID ); } + //if( tempelement != null && tempID != null ) { updatercanceller( tempID ); } tempID = _movID; - tempElement = document.getElementById(_movID); - let newRow = '
'; - newRow += '' - newRow += '' - newRow += '' - newRow += ''; - newRow += ''; - newRow += ''; - tempElement.innerHTML += newRow; + tempelement = document.getElementById(_movID); + temprow = tempelement.innerHTML; + let newrow = '
'; + newrow += '' + newrow += '' + newrow += '' + newrow += ''; + newrow += ''; + newrow += ''; + tempelement.innerHTML += newrow; }; function updatercanceller( _movID ) { - let title = document.getElementById( _movID ).children[0].innerHTML, + /*let title = document.getElementById( _movID ).children[0].innerHTML, genre = document.getElementById( _movID ).children[1].innerHTML, year = document.getElementById( _movID ).children[2].innerHTML, - newRow = ''; - newRow += '' + title + ''; - newRow += '' + genre + ''; - newRow += '' + year + ''; - newRow += '' + zackcheck(title, genre) + ''; - newRow += ''; - newRow += ''; - tempElement.innerHTML = newRow; - tempElement = null; - tempID = null; + newrow = ''; + newrow += '' + title + ''; + newrow += '' + genre + ''; + newrow += '' + year + ''; + newrow += '' + zackcheck(title, genre) + ''; + newrow += ''; + newrow += '';*/ + tempelement.innerHTML = temprow; + tempelement = null, tempID = null, temprow = null; }; function updatersubmitter( _movID ) { @@ -84,24 +84,14 @@ function updatersubmitter( _movID ) genre: document.getElementById( _movID ).children[8].children[0].value, year: document.getElementById( _movID ).children[9].children[0].value }, - body = JSON.stringify(json), - newrow = ''; - newrow += '' + json.title + ''; - newrow += '' + json.genre + ''; - newrow += '' + json.year + ''; - newrow += '' + zackcheck( json.title, json.genre ) + ''; - newrow += ''; - newrow += ''; + body = JSON.stringify(json); console.log( json.title ); console.log( body ); - console.log( document.getElementById( _movID ).children ); - console.log( newrow ); - tempElement.innerHTML = newrow; - fetch( '/update', { method: 'POST', headers: { "Content-Type": "application/json" }, body }) + deleter( _movID ); + fetch( '/submit', { method: 'POST', headers: { "Content-Type": "application/json" }, body }) .then( response => response.json() ) .then( dothething() ); - tempID = null; - tempElement = null; + tempID = null, tempelement = null, temprow = null; } const zackcheck = function( title, year ) { const years = [ 2004, 2007, 2009, 2010, 2011, 2013, 2016, 2017, 2021, 2021 ]; From bfa79699885d9a3a13488f6cbfdb3d6495e402f3 Mon Sep 17 00:00:00 2001 From: hyoder Date: Mon, 26 Sep 2022 23:07:15 -0400 Subject: [PATCH 86/92] commit --- public/scripts.js | 78 ++++++++++++++++------------------- public/views/index.handlebars | 1 + public/views/main.handlebars | 6 +-- server.js | 28 ++++++------- 4 files changed, 51 insertions(+), 62 deletions(-) diff --git a/public/scripts.js b/public/scripts.js index 9c5fd9868..6c4ffe0b5 100644 --- a/public/scripts.js +++ b/public/scripts.js @@ -1,19 +1,17 @@ let tempID = null, tempelement = null, temprow = null; function dothething() { - fetch('/data', { method: 'GET', headers: { "Content-Type": "application/json" } }) + fetch( '/data', { method: 'GET', headers: { "Content-Type": "application/json" } } ) .then( response => response.json() ) - .then( json => builder( json[ 0 ].items )); + .then( json => builder( json[ 0 ].items ) ); }; function builder ( json ) { const tbl = document.getElementById( 'datatable' ); tbl.innerHTML = 'titlegenreyeardirected by Zack Snyder?edit?delete?'; - console.log('ok?'); if( json != null ) { - console.log('ok!'); - json.forEach(entry => + json.forEach( entry => { let newRow = ''; newRow += '' + entry.title.toString().toUpperCase() + ''; @@ -23,7 +21,7 @@ function builder ( json ) newRow += ''; newRow += ''; datatable.innerHTML += newRow; - }); + } ); } }; function submitter( e ) @@ -34,8 +32,8 @@ function submitter( e ) json = { title: title.value, genre: genre.value, year: year.value }, body = JSON.stringify(json); fetch( '/submit', { method: 'POST', headers: { "Content-Type": "application/json" }, body }) - .then( response => response.json()) - .then(dothething()); + .then( response => response.json() ) + .then( dothething() ); return false; }; function deleter( _movID ) @@ -43,66 +41,62 @@ function deleter( _movID ) const json = { _movID: _movID }, body = JSON.stringify( json ); fetch( '/delete', { method: 'POST', headers: { "Content-Type": "application/json" }, body } ) - .then( response => { response.json() }) + .then( response => { response.json() } ) .then( dothething() ); return false; }; function updater( _movID, title, genre, year ) { - //if( tempelement != null && tempID != null ) { updatercanceller( tempID ); } tempID = _movID; tempelement = document.getElementById(_movID); temprow = tempelement.innerHTML; - let newrow = '
'; - newrow += '' - newrow += '' - newrow += '' - newrow += ''; - newrow += ''; - newrow += ''; + let newrow = '
'; + newrow += '' + newrow += '' + newrow += ''; + newrow += ''; + newrow += ''; tempelement.innerHTML += newrow; }; function updatercanceller( _movID ) { - /*let title = document.getElementById( _movID ).children[0].innerHTML, - genre = document.getElementById( _movID ).children[1].innerHTML, - year = document.getElementById( _movID ).children[2].innerHTML, - newrow = ''; - newrow += '' + title + ''; - newrow += '' + genre + ''; - newrow += '' + year + ''; - newrow += '' + zackcheck(title, genre) + ''; - newrow += ''; - newrow += '';*/ tempelement.innerHTML = temprow; tempelement = null, tempID = null, temprow = null; }; function updatersubmitter( _movID ) { - let json = { _movID: _movID, - title: document.getElementById( _movID ).children[7].children[0].value, - genre: document.getElementById( _movID ).children[8].children[0].value, - year: document.getElementById( _movID ).children[9].children[0].value - }, - body = JSON.stringify(json); - console.log( json.title ); - console.log( body ); + let json = { _movID: _movID, + title: document.getElementById( _movID ).children[7].children[0].value, + genre: document.getElementById( _movID ).children[8].children[0].value, + year: document.getElementById( _movID ).children[9].children[0].value + }, + body = JSON.stringify( json ); deleter( _movID ); - fetch( '/submit', { method: 'POST', headers: { "Content-Type": "application/json" }, body }) + fetch( '/submit', { method: 'POST', headers: { "Content-Type": "application/json" }, body } ) .then( response => response.json() ) .then( dothething() ); tempID = null, tempelement = null, temprow = null; -} -const zackcheck = function( title, year ) { +}; +const zackcheck = function( title, year ) +{ const years = [ 2004, 2007, 2009, 2010, 2011, 2013, 2016, 2017, 2021, 2021 ]; const titles = [ 'DAWN OF THE DEAD', '300', 'WATCHMEN', 'LEGEND OF THE GUARDIANS: THE OWLS OF GA\'HOOLE', 'SUCKER PUNCH', 'MAN OF STEEL', 'BATMAN V SUPERMAN: DAWN OF JUSTICE', 'JUSTICE LEAGUE', 'ZACK SNYDER\'S JUSTICE LEAGUE', 'ARMY OF THE DEAD'] const numFilms = 10; title = title.toString().toUpperCase(); - for ( let i = 0 ; i < numFilms ; i++ ) { if( year == years[ i ] && title == titles[ i ] ) { return 'YES!'; } } - return 'NO!'; }; -window.onload = function() { + for ( let i = 0 ; i < numFilms ; i++ ) + { + if( year == years[ i ] && title == titles[ i ] ) + { + return 'YES!'; + } + } + return 'NO!'; +}; +window.onload = function() +{ const submit = document.getElementById( 'submit' ); submit.onclick = submitter; - dothething(); }; \ No newline at end of file + dothething(); +}; \ No newline at end of file diff --git a/public/views/index.handlebars b/public/views/index.handlebars index 7b4fdadf7..6a2409b23 100644 --- a/public/views/index.handlebars +++ b/public/views/index.handlebars @@ -2,6 +2,7 @@ + log in now with github or else diff --git a/public/views/main.handlebars b/public/views/main.handlebars index f0c245c33..0dd36a305 100644 --- a/public/views/main.handlebars +++ b/public/views/main.handlebars @@ -4,10 +4,8 @@ cs4241 a3 - - - - + +
diff --git a/server.js b/server.js index 9307f200d..f0610f0e9 100644 --- a/server.js +++ b/server.js @@ -1,14 +1,14 @@ require('dotenv').config(); -const express = require( 'express' ), - app = express(), - cookie = require( 'cookie-session' ), - hbs = require( 'express-handlebars' ).engine, - bodyp = require( 'body-parser' ), - session = require( 'express-session' ), - path = require( 'path' ), - mongodb = require( 'mongodb' ), - uri = `mongodb+srv://${process.env.MONGODB_USER}:${process.env.MONGODB_PASS}@${process.env.MONGODB_HOST}`, - client = new mongodb.MongoClient(uri, {useNewUrlParser: true, useUnifiedTopology: true}), +const express = require( 'express' ), + app = express(), + cookie = require( 'cookie-session' ), + hbs = require( 'express-handlebars' ).engine, + bodyp = require( 'body-parser' ), + session = require( 'express-session' ), + path = require( 'path' ), + mongodb = require( 'mongodb' ), + uri = `mongodb+srv://${process.env.MONGODB_USER}:${process.env.MONGODB_PASS}@${process.env.MONGODB_HOST}`, + client = new mongodb.MongoClient(uri, {useNewUrlParser: true, useUnifiedTopology: true}), passport = require('passport'), GitHubStrategy = require('passport-github2').Strategy; let collection = undefined; @@ -29,7 +29,6 @@ app.use( ( req, res, next ) => app.engine( 'handlebars', hbs() ); app.set( 'view engine', 'handlebars' ); app.set( 'views', './public/views' ); -//app.use( cookie ({ name: 'session', keys: [ 'key1', 'key2' ] }) ); passport.use(new GitHubStrategy({ clientID: process.env.GITHUB_CLIENT_ID, clientSecret: process.env.GITHUB_CLIENT_SECRET, @@ -42,13 +41,10 @@ passport.use(new GitHubStrategy({ .then( () => { return collection.findOne( { githubID: profile.id } ) } ) .then( ( result ) => { return done( null, result._id ) } ) }); - //User.findOrCreate({ githubId: profile.id }, - //function(err, user) { return done(err, user); }); } )); app.get('/', ( req, res ) => { res.render( "index", { msg: "", layout: false } ) } ); app.get('/login', ( req, res ) => { res.render( "main", { msg: "", layout: false } ); } ); - //res.sendFile('index.html', { user: req.user, root: Path2D.join(__dirname, 'public')}); app.get('/auth/github', passport.authenticate('github', { scope: [ 'user:email' ] })); app.get('/auth/github/callback', passport.authenticate('github', { failureRedirect: '/login' }), function(req, res) { res.render( "main", { msg: "", layout: false } ); } ); @@ -70,14 +66,14 @@ app.post('/delete', checkAuth, ( req, res ) => { $pull: { items: { _movID: mongodb.ObjectId( req.body._movID ) } } }) .then( result => res.json( result ) ); }); -app.post('/update', checkAuth, ( req, res ) => +/*app.post('/update', checkAuth, ( req, res ) => { let changer = { _movID: mongodb.ObjectId( req.body._movID ), title: req.body.title, genre: req.body.genre, year: req.body.year }; console.log(changer); collection.updateOne({ _id: mongodb.ObjectId( req.session.passport.user ), "items._movID":mongodb.ObjectId( req.body._movID ) }, { $set: "items.$", changer }) .then( result => res.json( result ) ); -}); +});*/ function checkAuth( req, res, next ) { if ( req.isAuthenticated()) { return next(); } From d2a708402cb44e45eba2ab009f01fe6f71dd7f64 Mon Sep 17 00:00:00 2001 From: hyoder Date: Mon, 26 Sep 2022 23:13:27 -0400 Subject: [PATCH 87/92] commit --- public/style.css | 17 +++++++++++++++++ public/views/index.handlebars | 1 + public/views/main.handlebars | 1 + 3 files changed, 19 insertions(+) diff --git a/public/style.css b/public/style.css index e69de29bb..62eecb6b5 100644 --- a/public/style.css +++ b/public/style.css @@ -0,0 +1,17 @@ +* { background: #ABCEDF } +h1 { animation: shadow 100ms infinite; } +h2 { animation: slider 8000ms infinite; } +h3 { animation: fx-3d 1000ms infinite; } +button { animation: button 1000ms infinite; } +@keyframes shadow { + from{ text-shadow: 5px 15px 1px #FFFFFF; } + to{ text-shadow: 5px 15px 8px #FFFFFF; } } +@keyframes slider { + 0%, 100% { transform: translateX(00%); } + 50% { transform: translateX(60%); } } +@keyframes fx-3d { + 0%, 100% { text-shadow: 4px 4px 1px #FF0000; } + 50% { text-shadow: -4px -4px 1px #0000FF; } } +@keyframes button { + 00% { color: #000000; transform: scale(1.0); text-shadow: 0px 00px 0px #000000; } + 40% { color: #FF0000; transform: scale(1.2); text-shadow: 3px 10px 5px #000000; } } \ No newline at end of file diff --git a/public/views/index.handlebars b/public/views/index.handlebars index 6a2409b23..8db883c88 100644 --- a/public/views/index.handlebars +++ b/public/views/index.handlebars @@ -3,6 +3,7 @@ + log in now with github or else diff --git a/public/views/main.handlebars b/public/views/main.handlebars index 0dd36a305..477a37a2d 100644 --- a/public/views/main.handlebars +++ b/public/views/main.handlebars @@ -5,6 +5,7 @@ + From 7d11757d0836e246930fb9f26290a1e63d604ca1 Mon Sep 17 00:00:00 2001 From: hyoder Date: Mon, 26 Sep 2022 23:17:50 -0400 Subject: [PATCH 88/92] commit --- public/views/main.handlebars | 60 ++++++++++++++++++------------------ 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/public/views/main.handlebars b/public/views/main.handlebars index 477a37a2d..ba8e57eaa 100644 --- a/public/views/main.handlebars +++ b/public/views/main.handlebars @@ -1,34 +1,34 @@ - - cs4241 a3 - - - - - - - -
-
-

want to know if a movie is directed by zack snyder?

-

you're in luck

-

disclaimer: zack snyder is not very good at making movies

-
-
- -
-
- -
-
- -

-
-
-

data:

-
-
+ + cs4241 a3 + + + + + + + +
+
+

want to know if a movie is directed by zack snyder?

+

you're in luck

+

disclaimer: zack snyder is not very good at making movies

+
+
+ +
+
+ +
+
+ +

+
+
+

data:

+
- +
+ From dceb8e7ace27fed184b632f9441ff68d358b6538 Mon Sep 17 00:00:00 2001 From: hyoder Date: Mon, 26 Sep 2022 23:19:18 -0400 Subject: [PATCH 89/92] commit --- public/style.css | 2 +- public/views/main.handlebars | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/public/style.css b/public/style.css index 62eecb6b5..005ca875f 100644 --- a/public/style.css +++ b/public/style.css @@ -1,5 +1,5 @@ * { background: #ABCEDF } -h1 { animation: shadow 100ms infinite; } +body { animation: shadow 100ms infinite; } h2 { animation: slider 8000ms infinite; } h3 { animation: fx-3d 1000ms infinite; } button { animation: button 1000ms infinite; } diff --git a/public/views/main.handlebars b/public/views/main.handlebars index ba8e57eaa..91a481c51 100644 --- a/public/views/main.handlebars +++ b/public/views/main.handlebars @@ -6,7 +6,6 @@ -
From 0bbd833e46a90ef30441ac4033be3e8221aa607e Mon Sep 17 00:00:00 2001 From: hyoder Date: Mon, 26 Sep 2022 23:34:15 -0400 Subject: [PATCH 90/92] commit --- public/style.css | 3 ++- public/views/index.handlebars | 2 ++ public/views/main.handlebars | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/public/style.css b/public/style.css index 005ca875f..e4d490fc5 100644 --- a/public/style.css +++ b/public/style.css @@ -1,4 +1,5 @@ -* { background: #ABCEDF } +* { background: #ABCEDF; } +a { background: #FDECBA; } body { animation: shadow 100ms infinite; } h2 { animation: slider 8000ms infinite; } h3 { animation: fx-3d 1000ms infinite; } diff --git a/public/views/index.handlebars b/public/views/index.handlebars index 8db883c88..2a8e354d2 100644 --- a/public/views/index.handlebars +++ b/public/views/index.handlebars @@ -2,6 +2,8 @@ + + log in now with github or else diff --git a/public/views/main.handlebars b/public/views/main.handlebars index 91a481c51..09b547213 100644 --- a/public/views/main.handlebars +++ b/public/views/main.handlebars @@ -3,6 +3,8 @@ cs4241 a3 + + From eff2e07a211938df79cd9e347bc953512782d566 Mon Sep 17 00:00:00 2001 From: hyoder Date: Mon, 26 Sep 2022 23:46:37 -0400 Subject: [PATCH 91/92] commit --- public/style.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/style.css b/public/style.css index e4d490fc5..53afc79f3 100644 --- a/public/style.css +++ b/public/style.css @@ -1,5 +1,5 @@ -* { background: #ABCEDF; } -a { background: #FDECBA; } +* { background: #ABCDEF; font-size: 12px; } +a { background: #0E1117; } body { animation: shadow 100ms infinite; } h2 { animation: slider 8000ms infinite; } h3 { animation: fx-3d 1000ms infinite; } From 196968505afb8218ac20e562203f84666e7d012e Mon Sep 17 00:00:00 2001 From: hyoder Date: Tue, 27 Sep 2022 00:04:11 -0400 Subject: [PATCH 92/92] commit --- README.md | 145 ++++++++--------------------------- public/favicon.ico | Bin 0 -> 476559 bytes public/views/main.handlebars | 2 +- server.js | 2 + 4 files changed, 34 insertions(+), 115 deletions(-) create mode 100644 public/favicon.ico diff --git a/README.md b/README.md index 1ba2c7a4c..d2335c92a 100644 --- a/README.md +++ b/README.md @@ -1,116 +1,33 @@ -Assignment 3 - Persistence: Two-tier Web Application with Database, Express server, and CSS template +[assignment 3](https://a3-hyoder.herokuapp.com/) === -Due: September 22nd, by 11:59 AM. - -This assignnment continues where we left off, extending it to use the most popular Node.js server framework (express), -a database (mongodb), and a CSS application framework / template of your choice (Boostrap, Material Design, Semantic UI, Pure etc.) - -Baseline Requirements ---- - -Your application is required to implement the following functionalities: - -- a `Server`, created using Express (no alternatives will be accepted for this assignment) -- a `Results` functionality which shows all data associated with a logged in user (except passwords) -- a `Form/Entry` functionality which allows users to add, modify, and delete data items (must be all three!) associated with their user name / account. -- Use of at least five [Express middleware packages](https://expressjs.com/en/resources/middleware.html). Explore! One of these five middleware -can be a custom function that you write yourself; if you choose to do this, make sure to describe what this function is in your README. -- Persistent data storage in between server sessions using [mongodb](https://www.mongodb.com/cloud/atlas) -- Use of a [CSS framework or template](https://github.com/troxler/awesome-css-frameworks). -This should do the bulk of your styling/CSS for you and be appropriate to your application. -For example, don't use [NES.css](https://nostalgic-css.github.io/NES.css/) (which is awesome!) unless you're creating a game or some type of retro 80s site. - -Your application is required to demonstrate the use of the following concepts: - -HTML: -- HTML input tags and form fields of various flavors (`