locator-kn / web

Web Client
3 stars 1 forks source link

receiving status code 500 (internal server error) when deleting a location #66

Closed DennisMoosmann closed 9 years ago

DennisMoosmann commented 9 years ago

when deleting a location which is used in a trip i get this error message

SteffenGorenflo commented 9 years ago

Which route?

timoweiss commented 9 years ago

server says:

Debug: internal, implementation, error 
    TypeError: Uncaught error: undefined is not a function
    at Locationpool.server.route.config.handler (/home/locator/ark/node_modules/ark-locationpool/lib/js/plugin.js:369:42)
    at Object.internals.handler (/home/locator/ark/node_modules/hapi/lib/handler.js:94:36)
    at /home/locator/ark/node_modules/hapi/lib/handler.js:28:23
    at internals.Protect.run (/home/locator/ark/node_modules/hapi/lib/protect.js:56:5)
    at exports.execute (/home/locator/ark/node_modules/hapi/lib/handler.js:22:22)
    at /home/locator/ark/node_modules/hapi/lib/request.js:371:13
    at iterate (/home/locator/ark/node_modules/hapi/node_modules/items/lib/index.js:35:13)
    at done (/home/locator/ark/node_modules/hapi/node_modules/items/lib/index.js:27:25)
    at /home/locator/ark/node_modules/hapi/node_modules/hoek/lib/index.js:841:22
    at process._tickDomainCallback (node.js:371:15)

It's this.db.removeLocationFromTrips which is not in the database plugin.

SteffenGorenflo commented 9 years ago

Are we gonna support deleting locations, if they are in trips? Function does exist but is not exposed yet

timoweiss commented 9 years ago

dunno, but we can't call a function which does not exists ;)

SteffenGorenflo commented 9 years ago

yeah yeah, whatever --> fixed: https://github.com/locator-kn/ark-database/commit/cb59229159f126d4ffcef5d7f6b3cbe87eb1f37d