Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def delete_entry(id):
_entry = Entry.delete(id)
name = _entry['slug']
status = _entry['status']
if status == 'draft':
os.remove(os.path.join('./summer/_draft/', name + '.md'))
else:
os.remove(os.path.join('./summer/post/', name + '.md'))
return jsonify(r=True)