Skip to content

Commit 702fcf4

Browse files
committed
dev DB
1 parent 2383e75 commit 702fcf4

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/controllers/categoriesController.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ const listCategories = async (req, res) => {
2020
*/
2121

2222
const isOnlyNames = params.onlyname || typeof params.onlyname === 'string';
23+
const client = params.client || 'mobile'; // Default client if not provided
2324
const hasCustomFields = params.fields && !isOnlyNames;
2425

2526
let query = firestore.collection('categories').orderBy('category', 'asc');
@@ -32,6 +33,11 @@ const listCategories = async (req, res) => {
3233
}
3334
}
3435

36+
// Apply client filter
37+
if (client) {
38+
query = query.where('client', '==', client);
39+
}
40+
3541
// Apply field selection
3642
if (isOnlyNames) {
3743
query = query.select('category');

terraform/dev/variables.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ variable "environment" {
1515
variable "project_database" {
1616
type = string
1717
description = "The database name"
18-
default = "tech-report-api-prod" // TODO: Update this to the DEV database name
18+
default = "tech-report-api-dev"
1919
}
2020

2121
variable "google_service_account_cloud_functions" {

0 commit comments

Comments
 (0)