Compare commits

...

8 Commits

Author SHA1 Message Date
fb4281dfd5 Merge branch 'dev' into feature/fitlien-add-cors 2025-04-13 15:37:01 +05:30
810fc7305d Slash changed in url 2025-04-13 15:36:48 +05:30
01c87ffcfa Changed collection names (#17)
Reviewed-on: #17
Co-authored-by: DhanshCOSQ <dhanshas@cosq.net>
Co-committed-by: DhanshCOSQ <dhanshas@cosq.net>
2025-04-13 08:19:03 +00:00
0ecef0c051 Merge branch 'dev' of cosqnet.com:cosqnet/fitlien-services into dev 2025-04-13 13:29:42 +05:30
7a346f62a8 Updated firestore rules and index 2025-04-13 13:29:36 +05:30
094476072e Merge pull request 'Updated return url.' (#16) from feature/test-deploy into dev
Reviewed-on: #16
2025-04-13 06:19:20 +00:00
a9e4b31eb9 Updated return url. 2025-04-13 11:46:50 +05:30
08f1243729 feature/fitlien-add-cors (#15)
Reviewed-on: #15
Co-authored-by: DhanshCOSQ <dhanshas@cosq.net>
Co-committed-by: DhanshCOSQ <dhanshas@cosq.net>
2025-04-12 03:23:13 +00:00
7 changed files with 187 additions and 19 deletions

View File

@ -2,6 +2,7 @@
"projects": {
"debug": "fitlien-dev",
"qa": "fitlien-qa",
"release": "fitlien"
"release": "fitlien",
"default": "fitlien-dev"
}
}
}

View File

@ -14,8 +14,7 @@
"firebase-debug.*.log",
"*.local"
],
"predeploy": [
]
"predeploy": []
}
],
"storage": {

View File

@ -1,5 +1,33 @@
{
"indexes": [
{
"collectionGroup": "day_pass_bookings",
"queryScope": "COLLECTION",
"fields": [
{
"fieldPath": "userId",
"order": "ASCENDING"
},
{
"fieldPath": "createdAt",
"order": "DESCENDING"
}
]
},
{
"collectionGroup": "day_pass_entries",
"queryScope": "COLLECTION",
"fields": [
{
"fieldPath": "bookingId",
"order": "ASCENDING"
},
{
"fieldPath": "entryDate",
"order": "ASCENDING"
}
]
},
{
"collectionGroup": "gyms",
"queryScope": "COLLECTION_GROUP",
@ -13,7 +41,145 @@
"order": "ASCENDING"
}
]
},
{
"collectionGroup": "gyms",
"queryScope": "COLLECTION",
"fields": [
{
"fieldPath": "userId",
"order": "ASCENDING"
},
{
"fieldPath": "name",
"order": "ASCENDING"
}
]
},
{
"collectionGroup": "memberships",
"queryScope": "COLLECTION",
"fields": [
{
"fieldPath": "gymId",
"order": "ASCENDING"
},
{
"fieldPath": "createdAt",
"order": "DESCENDING"
}
]
},
{
"collectionGroup": "notifications",
"queryScope": "COLLECTION",
"fields": [
{
"fieldPath": "clientId",
"order": "ASCENDING"
},
{
"fieldPath": "timestamp",
"order": "DESCENDING"
}
]
},
{
"collectionGroup": "notifications",
"queryScope": "COLLECTION",
"fields": [
{
"fieldPath": "clientId",
"order": "ASCENDING"
},
{
"fieldPath": "type",
"order": "ASCENDING"
},
{
"fieldPath": "timestamp",
"order": "DESCENDING"
}
]
},
{
"collectionGroup": "notifications",
"queryScope": "COLLECTION",
"fields": [
{
"fieldPath": "ownerId",
"order": "ASCENDING"
},
{
"fieldPath": "timestamp",
"order": "DESCENDING"
}
]
},
{
"collectionGroup": "notifications",
"queryScope": "COLLECTION",
"fields": [
{
"fieldPath": "ownerId",
"order": "ASCENDING"
},
{
"fieldPath": "type",
"order": "ASCENDING"
},
{
"fieldPath": "timestamp",
"order": "DESCENDING"
}
]
},
{
"collectionGroup": "notifications",
"queryScope": "COLLECTION",
"fields": [
{
"fieldPath": "trainerId",
"order": "ASCENDING"
},
{
"fieldPath": "timestamp",
"order": "DESCENDING"
}
]
},
{
"collectionGroup": "notifications",
"queryScope": "COLLECTION",
"fields": [
{
"fieldPath": "type",
"order": "ASCENDING"
},
{
"fieldPath": "userId",
"order": "ASCENDING"
},
{
"fieldPath": "timestamp",
"order": "DESCENDING"
}
]
},
{
"collectionGroup": "terms_and_conditions",
"queryScope": "COLLECTION",
"fields": [
{
"fieldPath": "normalizedName",
"order": "ASCENDING"
},
{
"fieldPath": "userUid",
"order": "ASCENDING"
}
]
}
],
"fieldOverrides": []
}
}

View File

@ -1,19 +1,16 @@
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
// This rule allows anyone with your Firestore database reference to view, edit,
// and delete all data in your Firestore database. It is useful for getting
// started, but it is configured to expire after 30 days because it
// leaves your app open to attackers. At that time, all client
// requests to your Firestore database will be denied.
//
// Make sure to write security rules for your app before that time, or else
// all client requests to your Firestore database will be denied until you Update
// your rules
match /{document=**} {
allow read, write: if request.time < timestamp.date(2025, 1, 10);
allow read, write: if request.auth != null;
}
match /day_pass_bookings/{bookingId} {
allow read: if true;
allow write: if request.auth != null;
}
match /gyms/{gymId} {
allow read: if true;
allow write: if request.auth != null;
}
}
}

View File

@ -14,6 +14,7 @@
"firebase-admin": "^12.6.0",
"firebase-functions": "^6.0.1",
"form-data": "^4.0.1",
"functions": "file:",
"html-to-text": "^9.0.5",
"long": "^4.0.0",
"mailgun.js": "^10.4.0",
@ -3084,6 +3085,10 @@
"integrity": "sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g==",
"optional": true
},
"node_modules/functions": {
"resolved": "",
"link": true
},
"node_modules/gaxios": {
"version": "6.7.1",
"resolved": "https://registry.npmjs.org/gaxios/-/gaxios-6.7.1.tgz",

View File

@ -21,6 +21,7 @@
"firebase-admin": "^12.6.0",
"firebase-functions": "^6.0.1",
"form-data": "^4.0.1",
"functions": "file:",
"html-to-text": "^9.0.5",
"long": "^4.0.0",
"mailgun.js": "^10.4.0",

View File

@ -423,8 +423,7 @@ export const createCashfreeOrder = onRequest({
customer_phone: customerPhone
},
order_meta: {
return_url: `https://fitlien.com/payment-bridge?order_id=${orderId}&hash_key=${hashKey}&user_id=${userId}&gym_id=${gymId}&web_host_url=${webHostUrl}`,
// notify_url: `https://$filien.web.app/verifyCashfreePayment`
return_url: `http://${webHostUrl}?order_id=${orderId}&hash_key=${hashKey}&user_id=${userId}&gym_id=${gymId}#/payment-status-screen`,
},
order_note: productInfo || 'Fitlien Membership'
},