I'm making a charity app that uses the Firebase SDK to directly talk to Cloud Firestore from within the application
Anyone (user or not) can create a charity, every charity is located in a city.
If the user adds a new one, I want to stop the other users from creating a new charity for 30 minutes in the city he created the charity in.
And I think this is the way to implement the 30 minute duration but how can I make it in each city
match /charity/{document=**} {
allow create: if isCalm();
request.time > resource.data.timestamp + duration.value(30, 'm');
}
}
If you didn't understand here's an example : let's say i have 3 cities (A B and C) , if the user create a charity in city A i want to stop anyone from creating charities in city A for 30 minutes ..