feat: remove check if ID is included in featured threads
For the home page's performance, I have commented out/taken out some old items in the featured threads list. To keep previously shared links working, I have removed this check
This commit is contained in:
parent
1a7c9e8a02
commit
e369ec7fee
1 changed files with 9 additions and 12 deletions
|
@ -15,7 +15,7 @@ thread_ids = [
|
||||||
'113650907203476875',
|
'113650907203476875',
|
||||||
'113449531956042438',
|
'113449531956042438',
|
||||||
'113300434695033812',
|
'113300434695033812',
|
||||||
# '113210189309775644',
|
'113210189309775644',
|
||||||
'113073168505436055',
|
'113073168505436055',
|
||||||
'112979161274124372',
|
'112979161274124372',
|
||||||
'112857903897175549',
|
'112857903897175549',
|
||||||
|
@ -25,7 +25,7 @@ thread_ids = [
|
||||||
'112457129122626146',
|
'112457129122626146',
|
||||||
'112446314845243621',
|
'112446314845243621',
|
||||||
'112438729626526601',
|
'112438729626526601',
|
||||||
'112410098697040344',
|
# '112410098697040344',
|
||||||
# '112400284252533385',
|
# '112400284252533385',
|
||||||
# '112365019457303644',
|
# '112365019457303644',
|
||||||
# '112360396639315016',
|
# '112360396639315016',
|
||||||
|
@ -83,7 +83,6 @@ async def tag(id):
|
||||||
@threads.route('/<path:id>')
|
@threads.route('/<path:id>')
|
||||||
@cache.cached(timeout=300)
|
@cache.cached(timeout=300)
|
||||||
def thread(id):
|
def thread(id):
|
||||||
if id in thread_ids:
|
|
||||||
attribution = get_attribution()
|
attribution = get_attribution()
|
||||||
app = get_app_config()
|
app = get_app_config()
|
||||||
status = fetch_thread(id)
|
status = fetch_thread(id)
|
||||||
|
@ -91,8 +90,6 @@ def thread(id):
|
||||||
if len(status['summary']) > 69:
|
if len(status['summary']) > 69:
|
||||||
status['summary'] = status['summary'][:69] + '...'
|
status['summary'] = status['summary'][:69] + '...'
|
||||||
return render_template('_home.html', threads=[status], app=app, attribution=attribution, render_date=datetime.now())
|
return render_template('_home.html', threads=[status], app=app, attribution=attribution, render_date=datetime.now())
|
||||||
else:
|
|
||||||
return '<h1>Not Found</h1><p>🤷🤷♀️🤷♂️</p><a href="/">go home</a>', 404
|
|
||||||
|
|
||||||
@threads.route('/api')
|
@threads.route('/api')
|
||||||
@cache.cached(timeout=300)
|
@cache.cached(timeout=300)
|
||||||
|
|
Loading…
Reference in a new issue