a mini social media app for small communities

fix user link not existing on search

Changed files
+2 -1
src
database
templates
+1
src/database/post.v
··· 164 164 // todo: query options/filters, such as user:beep, !excluded-text, etc 165 165 pub fn (app &DatabaseAccess) search_for_posts(query string, limit int, offset int) []PostSearchResult { 166 166 println('searching, q=${query},l=${limit},o=${offset}') 167 + //todo: app.db.q_strings('select from Post where title like \'%${query}%\' or body like \'%${query}%\' order by posted_at desc limit limit offset offset') 167 168 posts := sql app.db { 168 169 select from Post where title like '%${query}%' order by posted_at desc limit limit offset offset 169 170 } or { [] }
+1 -1
src/templates/search.html
··· 53 53 user_link.appendChild(user_text) 54 54 p.appendChild(user_link) 55 55 56 - p.innerText += ': ' 56 + p.innerHTML += ': ' 57 57 58 58 const post_link = document.createElement('a') 59 59 post_link.href = '/post/' + result.post.id