Giter Club home page Giter Club logo

mybrary's People

Contributors

webdevsimplified avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mybrary's Issues

I think there is an issue with the renderFormPage function

Hi Kyle!
I think there is an issue with this function
async function renderFormPage(res, book, form, hasError = false) { try { const authors = await Author.find({}) const params = { authors: authors, book: book } if (hasError) { if (form === 'edit') { params.errorMessage = 'Error Updating Book' } else { params.errorMessage = 'Error Creating Book' } } res.render(books/${form}, params) } catch { res.redirect('/books') } }
On this commit. Here is the repro steps:
1- Start your server (after you have pulled the changes from the commit mentioned above
2- Go to "Add Book" and click it
3- Don't fill in any of the fields and click "Create"

Actual Result:
The browser will keep loading and nothing happens and then the app will crash.

Expected Result:
The app should redirect the user back to the /books/new page and populate all of the fields that were populated at the initial creation of the book. In my case where non of the fields was populated it should bring me back to the /books/new page and all fields should be empty.

Thanks!
Mohammed

Author not selected in books edit page

When I tried to edit a book, noted that the author of the book was not selected. I fixed by changing the if(author.id === book.author) for if(author.id == book.author).

Sorry if my english is bad.

TypeError: Cannot read property 'toString' of undefined

C:\Users\ASHU\Desktop\Office node projects\Test\node_modules\dotenv\lib\main.js:41
src.toString().split(NEWLINE).forEach(function (line, idx) {
^

TypeError: Cannot read property 'toString' of undefined
at Object.parse (C:\Users\ASHU\Desktop\Office node projects\Test\node_modules\dotenv\lib\main.js:41:7)
at Object. (C:\Users\ASHU\Desktop\Office node projects\Test\server.js:3:23)
at Module._compile (module.js:653:30)
at Object.Module._extensions..js (module.js:664:10)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
at Function.Module._load (module.js:498:3)
at Function.Module.runMain (module.js:694:10)
at startup (bootstrap_node.js:204:16)
at bootstrap_node.js:625:3

i am facing this error please someone help me i have already replaced the .load() to .parse()

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.