Skip to content

Instantly share code, notes, and snippets.

@mcsee
Created March 10, 2026 02:31
Show Gist options
  • Select an option

  • Save mcsee/1772e55d3cd2f1ab908d51b4512cc9e4 to your computer and use it in GitHub Desktop.

Select an option

Save mcsee/1772e55d3cd2f1ab908d51b4512cc9e4 to your computer and use it in GitHub Desktop.
// 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