on master help sign in
Merge pull request #108 from ilyakooo0/develop

Develop

commit14ebfbb91b2357ad14124eba765c0311d27f73ae authoriko <ilyakooo0@gmail.com> dateSat 11 May 2019, 00:11 (7 years ago) parent52da846759a2cb
3 files changed+7−5
denis/email.html+1−1 denis/src/Data/Query.hs+5−3 denis/src/Server/Auth/Mail.hs+1−1
denis/email.html+1−1
@@ -15,7 +15,7 @@
1515 </div>
1616 </div>
1717 <div align="center" style="margin-top: 233px;">
18− <a href="#" style="text-decoration: underline; font-family: sans-serif; color: #555;font-size: 13px;">Revoke access</a>
18+ <a href="#" style="text-decoration: underline; font-family: sans-serif; color: #555;font-size: 13px; margin-bottom: 21px;">Revoke access</a>
1919 </div>
2020</body>
2121
denis/src/Data/Query.hs+5−3
@@ -517,7 +517,7 @@ getFacultySearchResultQ = selectStar (from (table #faculties) &
517517 #facultyPath,
518518 #facultyCampusName,
519519 (arrayToText #facultyTags)])
520− query = tsQuery (param @1)
520+ query = tsQuery "russian" (param @1)
521521
522522tsRankCd
523523 :: Expression schema from grouping params ('NotNull 'PGtext)
@@ -534,9 +534,11 @@ tsVector lang x = UnsafeExpression $
534534 "to_tsvector" <> parenthesized (commaSeparated [singleQuotedUtf8 lang, renderExpression x])
535535
536536tsQuery
537− :: Expression schema from grouping params ('NotNull 'PGtext)
537+ :: ByteString -- ^ Language
538+ -> Expression schema from grouping params ('NotNull 'PGtext)
538539 -> Expression schema from grouping params ('NotNull 'PGtext)
539−tsQuery = unsafeFunction "to_tsquery"
540+tsQuery lang x = UnsafeExpression $
541+ "to_tsquery" <> parenthesized (commaSeparated [singleQuotedUtf8 lang, renderExpression x])
540542
541543arrayToText
542544 :: Expression schema from grouping params ('NotNull ('PGvararray ('NotNull 'PGtext)))
denis/src/Server/Auth/Mail.hs+1−1
@@ -39,6 +39,6 @@ sendMailWithConfig (MailConfig host port user pass) =
3939 liftIO . sendMailWithLogin' host (fromIntegral port) user pass
4040
4141genMail :: TokenVerificationCode -> TL.Text -> Part
42−genMail code ua = htmlPart $ "<html><body style=\"font-family: sans-serif;\"> <h1> <div align=\"center\" style=\"margin-top: 20vh;\"> <a href=\"#\" style=\"font-size: 34px; font-weight: bold; display: inline-block; padding: 7px 13px 7px 13px; margin-bottom: 89px; text-decoration: underline; font-family: sans-serif; color: #555;\"> Log in </a> <div style=\"font-size: 34px; font-weight: bold;\"> <span style=\"color: #bbb; font-weight: bold;\">from: </span>" <> ua <> "</div> <br/> <div style=\"font-size: 55px; font-weight: bold; border-radius: 10px; background-color: #eee; display: inline-block; padding: 7px 13px 7px 13px; box-shadow: 0px 5px 21px #bbb; background-image: linear-gradient(#f9f9f9, #eee);\">" <> TL.pack [a, b] <> "<div style=\"display: inline-block; width: 13px;\"></div>" <> TL.pack [c, d] <> "<div style=\"display: inline-block; width: 13px;\"></div>" <> TL.pack [e, f] <> "</div></div><div align=\"center\" style=\"margin-top: 233px;\"> <a href=\"#\" style=\"text-decoration: underline; font-family: sans-serif; color: #555;font-size: 13px;\">Revoke access</a> </div></body></html>"
42+genMail code ua = htmlPart $ "<html><body style=\"font-family: sans-serif;\"> <h1> <div align=\"center\" style=\"margin-top: 20vh;\"> <a href=\"#\" style=\"font-size: 34px; font-weight: bold; display: inline-block; padding: 7px 13px 7px 13px; margin-bottom: 89px; text-decoration: underline; font-family: sans-serif; color: #555;\"> Log in </a> <div style=\"font-size: 34px; font-weight: bold;\"> <span style=\"color: #bbb; font-weight: bold;\">from: </span>" <> ua <> "</div> <br/> <div style=\"font-size: 55px; font-weight: bold; border-radius: 10px; background-color: #eee; display: inline-block; padding: 7px 13px 7px 13px; box-shadow: 0px 5px 21px #bbb; background-image: linear-gradient(#f9f9f9, #eee);\">" <> TL.pack [a, b] <> "<div style=\"display: inline-block; width: 13px;\"></div>" <> TL.pack [c, d] <> "<div style=\"display: inline-block; width: 13px;\"></div>" <> TL.pack [e, f] <> "</div></div><div align=\"center\" style=\"margin-top: 233px;\"> <a href=\"#\" style=\"text-decoration: underline; font-family: sans-serif; color: #555;font-size: 13px; margin-bottom: 21px;\">Revoke access</a> </div></body></html>"
4343 where
4444 [a, b, c, d, e, f] = reverse . take 6 . (++ repeat '0') . reverse . show $ code