forked from tanner/qotnews
Fix deletion script
This commit is contained in:
parent
57de076fec
commit
6b16a768a7
|
@ -1,6 +1,8 @@
|
|||
import database
|
||||
import search
|
||||
import sys
|
||||
import settings
|
||||
import logging
|
||||
|
||||
import json
|
||||
import requests
|
||||
|
@ -21,7 +23,7 @@ def database_del_story(sid):
|
|||
|
||||
def search_del_story(sid):
|
||||
try:
|
||||
r = requests.delete(search.MEILI_URL + 'indexes/qotnews/documents/'+sid, timeout=2)
|
||||
r = requests.delete(settings.MEILI_URL + 'indexes/qotnews/documents/'+sid, timeout=2)
|
||||
if r.status_code != 202:
|
||||
raise Exception('Bad response code ' + str(r.status_code))
|
||||
return r.json()
|
||||
|
|
Loading…
Reference in New Issue
Block a user