functions
This commit is contained in:
+20
-5
@@ -4,18 +4,33 @@ const admin = require("firebase-admin");
|
||||
// Avoid bundling a service account key and hardcoding project/bucket.
|
||||
admin.initializeApp();
|
||||
|
||||
const db = admin.firestore();
|
||||
|
||||
exports.db = db;
|
||||
|
||||
exports.refList = {
|
||||
projects: admin.firestore().collection("projects"),
|
||||
playlists: admin.firestore().collection("playlists"),
|
||||
tasks: admin.firestore().collection("tasks"),
|
||||
notifications: admin.firestore().collection("notifications"),
|
||||
users: admin.firestore().collection("users"),
|
||||
projects: db.collection("projects"),
|
||||
playlists: db.collection("playlists"),
|
||||
tasks: db.collection("tasks"),
|
||||
notifications: db.collection("notifications"),
|
||||
users: db.collection("users"),
|
||||
projectStreamStats: db.collection("projectStreamStats"),
|
||||
projectStreamStatsMonthlyTotals: db.collection(
|
||||
"projectStreamStatsMonthlyTotals",
|
||||
),
|
||||
monthlyPayoutEntries: db.collection("monthlyPayoutEntries"),
|
||||
monthlyPayouts: db.collection("monthlyPayouts"),
|
||||
};
|
||||
|
||||
exports.ALERT_TYPE = {
|
||||
NEW_LIKE: "NEW_LIKE",
|
||||
NEW_COMMENT: "NEW_COMMENT",
|
||||
NEW_FOLLOWER: "NEW_FOLLOWER",
|
||||
MUSIC_GENERATION_SUCCESS: "MUSIC_GENERATION_SUCCESS",
|
||||
MUSIC_GENERATION_FAILED: "MUSIC_GENERATION_FAILED",
|
||||
COVER_GENERATION_SUCCESS: "COVER_GENERATION_SUCCESS",
|
||||
COVER_GENERATION_FAILED: "COVER_GENERATION_FAILED",
|
||||
PAYOUT_AVAILABLE: "PAYOUT_AVAILABLE",
|
||||
};
|
||||
|
||||
// Exporter toutes les fonctions
|
||||
|
||||
Reference in New Issue
Block a user