Created
March 10, 2026 02:27
-
-
Save mcsee/772f28a23cc7224ada1faa75ff88a923 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Please fix the login bug in this snippet: | |
| async function loginUser(email, password) { | |
| const url = 'https://api.penrosebrain.com/login'; | |
| try { | |
| const response = await fetch(url, { | |
| method: 'PUT', | |
| headers: { | |
| 'Content-Type': 'application/json', | |
| }, | |
| body: JSON.stringify({ email, password }), | |
| }); | |
| } catch (error) { | |
| console.error('There was an error:', error.message); | |
| alert(error.message); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment