forked from cpinitiative/cpinitiative
-
Notifications
You must be signed in to change notification settings - Fork 0
/
firebase.ts
19 lines (17 loc) · 3.87 KB
/
firebase.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import { initializeApp, getApps } from "firebase-admin/app"
import { getFirestore } from "firebase-admin/firestore"
import { credential } from "firebase-admin"
import { decrypt } from "./src/util/cryptography"
if (!getApps().length) {
initializeApp({
credential: credential.cert({
projectId: "usaco-guide",
privateKey: decrypt(
"c8f12cc835f4931c49b043e6ed585d65:1d76405ada356425bb9083cfc295a758a15cd857d9294d5934a3e140eb1573c2c30d273e14dd02c4ceb4256dfd1f40278819f667ed66bfcf95e38b2b3f291f993f12888a1af981c3f2d89dc28cf52e3bf71a90624861f15f242fc99a9c9ed543e48001a5ceb4eb0688db70dfa1fea4d54ada528655dc7e85632f8113ebd3ea35d3fa353645e07b4cf95b652ab93a66abad970548bd24fae58f528f9e6d77c637a7b64e04a6a47bf4febcd31f484c7c6032f12404962d056f8a0cd3a73b41e82182f81f8db1908b8071c86de2941ea7bc5f23efed69201139b1b857db8944ee20f035c7266fdb9eb5702a3ec4f169fa18e42fd2e82309b22c1703e5155d3efa1fa27306129c0865700ece0737d3e00f4d527d484b9ae5aefbb27ca03747b4f965a98ea7044ad4380cfbbce1b03089e094ee4049ce76acd7b7fdc67e37bce55d92a5c2fb4284b03217dcff964fd84be648513bc0875bc58b6d87e28adcf2019b314013123120352d88de78d33331d3c682b72088607d3764308aaba8025591800873fc1bad9e436d4032b7c2495f31d6fdfdf6329e6bb8c0529fe56e0511313709ea74d2e23aeeea76fe7f2694c6c6d4eccffb8d40368bee234ee121939a03e6e60102b03d8bb448230d76edaeff2f9ae41be96c8d99c4fe75e7bc0af86c80ac213bbda9f34dedf8ef512653e5fa4e911dffb4fa83c3e37de2b7f5a71eae27ef5c22998e885708457c1eebf6094f6f82de3ac10d936aee5bf1cf4ef40145464238dd7247e26e593c275ad580f139fbc8cd8518b13450df8809fd406b0e91b3569647f6c148f1837327c3de3a704a089a1a8f72e2356564a95513b77590e93edf5c7c4b7adbc5e9811f30735c4fd800169d216fcf033866487bb50fdfe0ddca04e17f9dd2ac3ed059e963886941fdf5cafd196d5e068f763228f5b4c83353cf3e91dc23b408082603680bfff0cc5f91adc855070891441bfe4a94befd235229120f3b0a1ee8c4ce518bb6510f14134366de3d2f7b75b334a5a4053af29bad56dcb94948707d9e3eb1fdfbde93de32b5028222730060e9278b5d3048b53544e755f67e3b0b52142857b294ff1d2faaff619bbd28b7444a2da7c5f53e2223dbe816736dbb4491a194caeb1273f120920c06e083f8eb8e0b959903aa32b738d49f80f0a72dcbe9103d37ed61f0414604ec1f71958c46267f783e833b43ebaf5087ea9aa9e16ec90d880c0b222541f96cf606db936a1aa41834a61bb0da85b569e2335e88e77bb0eb9b4970390ccd72c31073b7a74869fd2a09dcda98b61e2d19fd5708b8d23d6741f9f2c58e540431539b969bf0d1d21488bc70e8f539a76498fdd9362798520624d574eeb4975a73513dd18ef779ecd4304c2f8755247e27f151e056e7d16f9c4dab3f88c7b39cb7d4bfc561b0f49e702273b5eb4cccec94eeedf411307d74095a7b65c6a83cd22652b69f8dc7f3f117545c4e441998a2f29c67f8a62edcff3533fd443d9b27dcc51f73e7f9be1c68bd2b809e809a2daee4d9fd6377a3b35302418fc6159bb18e83908c86bbf59558cb453f26d4e3c4d4f08e6389ffac9b693b39a860bf1de31042a32e4de0dddadd6a143eddc755ffd1ea112efaf598001cd6233024462ddd224272ce5d605eb6c9705525056c014062bd60e34e0685a5f5b7658d30bad37a4a5acef601567ea856a3fc6dfc625931bab3d80c6a9f9f5218768eb08c664372450d0244faed10c9a41c774a7d6d58e444a79d97e7507928ca16a19fd8b08a719c8a72fe48b9a9556366b6938e8c1ac6ef4e6e4509c7a3dad9283db6dd3f7d49063d882e44681670b6af37354ba847a403d491786ebfedf82550ec34d6c256bc7ea73f7bbe91783aedbacea55621ca83840da5d378a9f037247e2e03650202106b55a9b336cafe001d36fa12503b4ecf1aac692ec840cff2d04183cb5bbd5b2d5f08acc5a53ffbd3a329ef1ce697a9b8cbded83c5443d7c08e3aa6020fcea1c00d6448dddb12e3764647aeaab165a5eb4450b0353aa8d1036497aaefaae1e8e61ffc609f9dbd6ca0c354f8bd42db2ada5017dfef2d12a1d5707bb02361d59e865d90c7778a1febb4e2d9a73729704154fe1450b2d267ab530d2f10c1247d7fa6f373ca066e6abff508ac7c0e63857c351f6cf391ccedb3f2ca8227d0816571dea85a27f9f22755ece3b52bd3fe9893c1204650414165ff85fdec6323627c435592a0311f40b234ac68aac6c3fe573d722672973aac7a33bd152ec016d3b83efab75bb2cf9e6d8e2ad1994da059006f845071e7928e455585de7bf10533fb5446f547fefdbd8a16b3dda704823c1956e5bde7576e75dfd38844bb56d83932de78aa2881c8f89072af46583a3238003753ee92dde645e69e66d03e85b511bd7dead92d04d333a4"
),
clientEmail:
}),
})
}
export const db = getFirestore()