creating link successfully
This commit is contained in:
@@ -7,5 +7,5 @@ export enum Collections {
|
||||
|
||||
rooms = "rooms",
|
||||
announcements = "announcements",
|
||||
attachments = "attachments",
|
||||
links = "links",
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ import {
|
||||
getFirestore,
|
||||
serverTimestamp,
|
||||
} from "firebase/firestore";
|
||||
import Link from "../models/link";
|
||||
import { Message } from "../models/message";
|
||||
import { Collections } from "./collections";
|
||||
|
||||
@@ -23,4 +24,11 @@ export class SendService {
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
async sendLink(link: Link) {
|
||||
await addDoc(collection(this.db, Collections.links), {
|
||||
...link,
|
||||
createdDate: serverTimestamp(),
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user