continue subscriptions and coins
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
const admin = require("firebase-admin");
|
||||
const { FieldValue } = require("firebase-admin/firestore");
|
||||
|
||||
const ORDER_TYPES = {
|
||||
GIFT: "GIFT",
|
||||
SONG: "SONG",
|
||||
COINS: "COINS",
|
||||
SUBSCRIPTION: "SUBSCRIPTION",
|
||||
};
|
||||
|
||||
const ORDER_STATUS = {
|
||||
@@ -60,7 +62,7 @@ const createOrderDocument = async ({
|
||||
type,
|
||||
amount: normalizedAmount,
|
||||
songId: type === ORDER_TYPES.SONG ? songId || null : null,
|
||||
createdAt: admin.firestore.FieldValue.serverTimestamp(),
|
||||
createdAt: FieldValue.serverTimestamp(),
|
||||
createdBy: createdBy || "system",
|
||||
status: ORDER_STATUS.PENDING,
|
||||
metadata: metadata || {},
|
||||
|
||||
Reference in New Issue
Block a user