Skip to content

Commit

Permalink
🐛 totalCount #32
Browse files Browse the repository at this point in the history
  • Loading branch information
kenu committed Aug 8, 2024
1 parent 5de63b2 commit be92ecf
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
3 changes: 2 additions & 1 deletion web/routes/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ router.use(passport.session())
router.get('/', async function (req, res, next) {
const uri = 'dev'
const title = '개발 관련 유튜브'
const hashList = ['멍슨상', 'spring', 'rust']
const hashList = ['AI', 'spring', '자바스크립트']
const isApi = req.query.a === '1'
const page = parseInt(req.query.page) || 1
const pageSize = 30
Expand Down Expand Up @@ -79,6 +79,7 @@ async function goRenderPage(
res.render('index', {
title,
list: data.rows,
totalCount: data.count,
locale,
uri,
hashList,
Expand Down
3 changes: 1 addition & 2 deletions web/utils/summary.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import OpenAI from 'openai'

const openai = new OpenAI()

async function summarize(messages) {
const openai = new OpenAI()
const completion = await openai.chat.completions.create({
messages: messages,
model: 'gpt-3.5-turbo',
Expand Down
2 changes: 1 addition & 1 deletion web/views/header.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="og:title" content="<%= title %>" />
<meta property="og:description" content="<%= title %>, <%= list.length %> movies" />
<meta property="og:description" content="<%= title %>, <%= totalCount %> movies" />
<meta property="og:url" content="https://mp4.okdevtv.com/<%= uri %>" />
<meta property="og:type" content="website" />
<meta property="og:locale" content="<%= locale %>" />
Expand Down

0 comments on commit be92ecf

Please sign in to comment.