filter product
This commit is contained in:
parent
7c05dd14fc
commit
cf50431beb
8
app.py
8
app.py
@ -239,7 +239,7 @@ def send_email():
|
|||||||
resend.Emails.send(params)
|
resend.Emails.send(params)
|
||||||
|
|
||||||
# Fetch user details from the database
|
# Fetch user details from the database
|
||||||
cred = supabase.table('vertexgpu-cred').select('username, password').eq('taken', False).eq(product).order('id').execute()
|
cred = supabase.table('vertexgpu-cred').select('username, password').eq('taken', False).eq('gpu', product).order('id').execute()
|
||||||
if cred.data:
|
if cred.data:
|
||||||
usernamedb = cred.data[0]['username']
|
usernamedb = cred.data[0]['username']
|
||||||
password = cred.data[0]['password']
|
password = cred.data[0]['password']
|
||||||
@ -397,8 +397,10 @@ def send_email():
|
|||||||
resend.Emails.send(params)
|
resend.Emails.send(params)
|
||||||
|
|
||||||
return jsonify({'status': 'success', 'message': 'email sent'})
|
return jsonify({'status': 'success', 'message': 'email sent'})
|
||||||
except:
|
except Exception as e:
|
||||||
return jsonify({'status': 'error', 'message': 'Failed to send email'}), 500
|
message = f"Error: {e}"
|
||||||
|
print(message)
|
||||||
|
return jsonify({'status': 'error', 'message': message}), 500
|
||||||
|
|
||||||
@app.route('/health')
|
@app.route('/health')
|
||||||
def health():
|
def health():
|
||||||
|
Loading…
x
Reference in New Issue
Block a user