Merge branch 'main' of github.com:rafaelfoster/oikos
This commit is contained in:
@@ -6,7 +6,7 @@ import { deleteBirthdayArtifacts, hydrateBirthday, syncBirthdayArtifacts, syncAl
|
||||
|
||||
const log = createLogger('Birthdays');
|
||||
const router = express.Router();
|
||||
const MAX_PHOTO_LENGTH = 900_000;
|
||||
const MAX_PHOTO_LENGTH = 6_990_507; // ~5 MB raw image in base64
|
||||
const PHOTO_RE = /^data:image\/(png|jpeg|jpg|webp|gif);base64,[A-Za-z0-9+/=]+$/;
|
||||
|
||||
function validatePhotoData(val) {
|
||||
|
||||
@@ -144,7 +144,7 @@ router.get('/', (req, res) => {
|
||||
(SELECT COUNT(*) FROM shopping_items si WHERE si.list_id = sl.id AND si.is_checked = 0) AS open_count,
|
||||
(SELECT COUNT(*) FROM shopping_items si WHERE si.list_id = sl.id) AS total_count
|
||||
FROM shopping_lists sl
|
||||
HAVING open_count > 0
|
||||
WHERE (SELECT COUNT(*) FROM shopping_items si WHERE si.list_id = sl.id AND si.is_checked = 0) > 0
|
||||
ORDER BY sl.updated_at DESC
|
||||
LIMIT 3
|
||||
`).all();
|
||||
|
||||
Reference in New Issue
Block a user