Skip to content

Instantly share code, notes, and snippets.

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

  • Save mcsee/772f28a23cc7224ada1faa75ff88a923 to your computer and use it in GitHub Desktop.

Select an option

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