create listing if user host
This commit is contained in:
@@ -62,6 +62,9 @@ def dashboard():
|
||||
@app.route('/create-listing', methods=['GET', 'POST'])
|
||||
@login_required
|
||||
def create_listing():
|
||||
if not current_user.is_host:
|
||||
return redirect(url_for('home'))
|
||||
|
||||
if request.method == 'POST':
|
||||
title = request.form['title']
|
||||
description = request.form['description']
|
||||
|
||||
Reference in New Issue
Block a user