From ebb9c8e3b06f54b36a6bf97f6cc5fcd851fba1bf Mon Sep 17 00:00:00 2001 From: Lambda_School_Loaner_184 Date: Tue, 24 Sep 2019 14:01:42 -0600 Subject: [PATCH] finished search route --- database/users.db3 | Bin 36864 -> 36864 bytes search/searchRouter.js | 71 ++++++++++++++++++++++++++++++++++------- 2 files changed, 59 insertions(+), 12 deletions(-) diff --git a/database/users.db3 b/database/users.db3 index 4ba467e9a88456ee129fb56d29d0c262c9e0c45a..3dc199512c92fd27685b20dcaf807e389bbfb960 100644 GIT binary patch literal 36864 zcmeI)OK;;u8~|{;X`7^v7%f5(S`JZ`l{VTo_?Z{1M4DvVy!zOt*|b7(+;p0{P3**W z+O&v+S4f-?5(mBj;=&mTi6a+204F3Q1VZ8l9{_~#xLG&NrVVV^Lsx%mlZ`#&zyI@_ zakZYzc5|a38z``^YE8)qaKtMFNfPe{0t7+avR+>6^>mxIK1@E{vHm9eK410m77^wH z^Yga}&+In@mGu4L%gui>e`hW-_ltD^HV^;-5C8!X009sH0T2Lze<^V0ar={ZN%OX> z?4ju4mwfV?A?-F$f1Li$?%w4}$)!T(*>Jsl<-Ka)Skh_-l6H?3gwR5uic6}2L)}V3 zQH_AoX*8^(PcI+XlMH0YP1IM|(&VP3od%B3sg>wO&@a=U}2&^2wSFYuB*frY=)Dr(!%=F;E?8jz*v#2;V z)|nym9ny_MK6z_cvj>_paVe&K|Mhv;?Yv0V>62^w6DM-f6TSOqS2Ah`j+WJ@PDhCN zzNtEQP-xy7;3V}UVf}#(1V8`;KmY_l00ck)1V8`;KmY_l;06i=$tmJ(?-WZjaXQX& zjKDEGE$+*jZiEkYvRQpE_Yr>npP;@csNbwN*gyaTKmY_l00ck)1V8`;KmY_l00eG| zz^w__eeb}+13&2!29Mc`BhJ77|C6BpyeZ9tJV5{iKmY_l00ck)1V8`;KmY_l00jPn zfQxhy9{l`o{ilD}KmY_l00ck)1V8`;KmY_l00ck)1YTl+8QeB_{(p&k7@7tGAOHd& z00JNY0w4eaAOHd&00IPozyF_ee@IYy-)Hkb&o9iK%zisNKU493?)lvlw+dhb0T2KI z5C8!Xcp(BNJ2zD{PadphcMjGJP1#40Y_!9*BRrj1ONmS6T8r2BYCG=-YpQxAqhR9w zpsLArS&;qRYZc?E0if4i7pZFkvAojFq$##AH2o(pqY9J-W<^<&~_ux0T<{p02keIh3Xg zYu(jkcYnO3`FKL$!f|>m>5CvH>$Z~?Qt9njQa?ylB0K99rc!#O?@GIcUDRDc>-opx zI7!pifKKp2I3DMpU%Eet$xhoz?=o3Yi=WZy&PiK~E=MZM#oc3xKH1(wFIAH-y*?4)_L-aTDAW2DDt&6VSdN@tZ=7AJXUq7a; z>+uPe4@bti5&MIf?4+GEbCQy@q}n>-w#vztwo=SU8CB`zAM*9hqnx0OnKYLW*l=u| zpVL;-P7srI*-1AWE0tWdeUPi|EHABXH_N$5X*agPXS#VsuII;3nu&#DJU7;u<`TUi zCOcs#eYm-}Ch*yoMCZ{~w!G6=RPx3_Q_N~iy;w{BFG&l`|By5eVzQ*2G<#-59@SRa zvXXr)7FM^7(^_n)%;-^`N2Pd~f9~PImsm^4`sqQ39ta8oAOHd&00JNY0w4eaAOHd&a5DwobQQ@_lh<>& z(x}PeSzKw<@xYDS}wP{>w)MVBat~6@$XcAW%HCf}r zl}1gDOx$r5y`v^0&Y%CkAgEud@2D@SkEs^5NkypFeSi6W@_p<3;${v=$QlGd00ck) z1V8`;KmY_l00cnbMhd*)dO%*a4sC8op|jp=c4%R5UDeExLTCMw_u0aWbwZxOLVIaT vZ&8nXXkl;h%=C~#XOYU(kV0o2$K=q$-g*hwRfTw6!o+RY1Fyq3@csWkQk)HJ delta 27 jcmZozz|^pSX@WE(+e8^>Mz)O!OX4@PIQ)@c6d(Wqd { - const {Strain, Type, Rating, Effects, Flavor, Description} = req.body; - console.log(Strain + '\n'); - console.log(Type + '\n'); - console.log(Rating + '\n'); - console.log(Effects + '\n'); - console.log(Flavor + '\n'); - console.log(Description + '\n'); - res.send('GOT YOUR QUERY!') +const dummyData = [ + { + Strain: "Ghost-Ship", + Type: "indica", + Rating: 4.0, + Effects: "Relaxed,Happy,Sleepy,Euphoric,Tingly", + Flavor: "Earthy,Pungent,Skunk", + Description: + "Ghost Ship is an indica-dominant cross between Purple Kush Starship and Gupta Kush created by Colorado Seed Inc. Pervasive relaxation cascades over the body, but the buzz is not lethargic. With a very strong aroma that can only be described as \u201cKushy,\u201d this strain soothes aches and pains while lending heady introspection. Think hard and rest easy. This flower is a solid option for muscle relaxation and stress relief. \u00a0" + }, + { + Strain: "Sfv-Og-Kush", + Type: "indica", + Rating: 4.5, + Effects: "Relaxed,Happy,Euphoric,Uplifted,Sleepy", + Flavor: "Pine,Earthy,Lemon", + Description: + "SFV OG Kush, not to be confused with its precursor SFV OG, is an indica-dominant strain bred from OG Kush genetics by The Cali Connection. By crossing an SFV OG clone with an Afghani father and selecting for favorable traits over several generations, the indica-heavy SFV OG Kush was born. You can smell the OG genes in this one, as its odor is commonly described as a strong lemon cleaner smell intermixed with pine." + }, + { + Strain: "Blue-Boy", + Type: "hybrid", + Rating: 4.1, + Effects: "Happy,Relaxed,Giggly,Euphoric,Aroused", + Flavor: "Earthy,Pungent,Flowery", + Description: + "Blue Boy is a cross of popular favorites Blue Dream and Northern Lights #5 that will give you anything but the blues. Originally from Washington state, this sativa-dominant hybrid provides focused, cerebral effects that make it a great choice for daytime use. Its plants are bushy and grow large, and the flowers tend to be large and on the looser, leafier side. Blue Boy is a potent strain with THC levels that often test over 20%." + }, + { + Strain: "Fruity-Pebbles", + Type: "hybrid", + Rating: 4.4, + Effects: "Happy,Relaxed,Uplifted,Euphoric,Giggly", + Flavor: "Sweet,Tropical,Berry", + Description: + "Fruity Pebbles (AKA Fruity Pebbles OG) by Alien Genetics was a limited-time offering from the breeder. This sweet hybrid takes genetics from Green Ribbon, Granddaddy Purple, and Tahoe Alien\u00a0to create a tropical, berry flavor reminiscent of the cereal. The euphoric effects will keep you happy when you\u2019re stressed and help you catch some sleep when faced with insomnia. Sit back, relax, and pour yourself a bowl of Fruity Pebbles!" + }, + { + Strain: "Six-Shooter", + Type: "hybrid", + Rating: 4.6, + Effects: "Creative,Euphoric,Happy,Uplifted,Focused", + Flavor: "Sweet,Skunk,Citrus", + Description: + "Six Shooter by Royal Dutch Genetics is a six-way cross that comes out as a sativa-dominant hybrid with effects as diverse as its lineage. By crossing Haze, Super Skunk, Northern Lights, Brazilian, Royal Dutch, and Trainwreck, this strain achieves a symphony of effects that lean ever so gently toward the stimulating side, complementing the latent indica effect nestled deep between the\u00a0calyxes of this flower. Its effects can inspire appetite, subdue anxiety and mild physical pain, and offer a pleasant euphoria that is quick to arrive and slow to fade" + } +]; + +router.get("/", async (req, res) => { + try { + const { searchQuery } = req.body; + const resultStrains = dummyData; + res.send(resultStrains); + } catch (err) { + console.log(err.message); + } }); -module.exports = router; \ No newline at end of file +module.exports = router;