0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-13 22:41:32 -05:00
ghost/core/server/models
Lev Gimelfarb a0ace7a324 Fixing 404 on page view when using PostgreSQL
closes #1801
- adding fixBools method to `server/models/base.js` to convert bools to 1/0 to be consistent with MySQL & sqlite3 data providers (based on @ErisDS recommendation)
- this in turn fixes the check in `server/controllers/frontend.js`, which does an explicit `post.page === 0` comparison (in pgsql this is a `boolean`, since the schema declares it as "bool" in `server/data/schema.js`, but MySQL/sqlite3 don't have concept of Boolean, only an integer or bit)
- any model retrieved from persistence will pass through this (possible future refactoring is to combine fixBools & fixDates into one "canonicalize()" to have a single loop pass)
2014-01-05 10:10:43 -05:00
..
base.js Fixing 404 on page view when using PostgreSQL 2014-01-05 10:10:43 -05:00
index.js Delete all content (posts and tags) 2013-12-25 01:05:20 +01:00
permission.js Updating to bookshelf 0.5.7 & knex 0.4.11 2013-10-17 18:23:36 +01:00
post.js Correctly order posts in admin and frontend 2013-12-24 11:18:32 +00:00
role.js Updating to bookshelf 0.5.7 & knex 0.4.11 2013-10-17 18:23:36 +01:00
session.js Replace cookieSession with session 2013-11-24 15:29:36 +01:00
settings.js Add transactions for import 2013-11-20 21:36:02 +01:00
tag.js Updating to bookshelf 0.5.7 & knex 0.4.11 2013-10-17 18:23:36 +01:00
user.js Fix gravatar retrieval 2014-01-01 18:10:55 +00:00