Created
March 10, 2026 02:31
-
-
Save mcsee/1772e55d3cd2f1ab908d51b4512cc9e4 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
| // opencode: "Create a failing text, fix the login bug, run tests, | |
| // Ensure it passes the new test and all the previous ones | |
| // Create a Pull Request so I can review it | |
| 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