forked from b00tc4mp/eurofirms-bootcamp-202402
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
implement apì routes and fixed errors in logic b00tc4mp#257
- Loading branch information
Showing
9 changed files
with
116 additions
and
23 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,13 @@ | ||
import authenticateUser from './authenticateUser'; | ||
import registerCustomer from './registerCustomer'; | ||
import registerManager from './registerManager'; | ||
import authenticateUser from './authenticateUser.js'; | ||
import registerCustomer from './registerCustomer.js'; | ||
import registerManager from './registerManager.js'; | ||
|
||
const logic = { | ||
authenticateUser: authenticateUser | ||
} | ||
authenticateUser, | ||
registerCustomer, | ||
registerManager, | ||
|
||
|
||
export default logic = { | ||
} | ||
|
||
} | ||
export default logic |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,4 +10,4 @@ mongoose.connect('mongodb://localhost:27017/project') | |
} catch (error) { | ||
console.error(error) | ||
} | ||
}) | ||
}) |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import mongoose from 'mongoose'; | ||
import registerManager from './registerManager.js'; | ||
|
||
mongoose.connect('mongodb://localhost:27017/project') | ||
.then(() => { | ||
try { | ||
registerManager('Bebe Jefazo', '2000-01-01', '[email protected]', '12341234') | ||
.catch(error => console.error(error)) | ||
.then(() => console.log('manager created')) | ||
} catch (error) { | ||
console.error(error) | ||
} | ||
}) |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
curl -X POST -H 'Content-type: application/json' -d '{"name":"perico el de los palotes","1995-01-02","email":"[email protected]","password":"12341234"}' http://localhost:8080/users/customer -v |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.