시스템 업데이트트
This commit is contained in:
28
functions/.eslintrc.js
Normal file
28
functions/.eslintrc.js
Normal file
@@ -0,0 +1,28 @@
|
||||
module.exports = {
|
||||
env: {
|
||||
es6: true,
|
||||
node: true,
|
||||
},
|
||||
parserOptions: {
|
||||
"ecmaVersion": 2018,
|
||||
},
|
||||
extends: [
|
||||
"eslint:recommended",
|
||||
"google",
|
||||
],
|
||||
rules: {
|
||||
"no-restricted-globals": ["error", "name", "length"],
|
||||
"prefer-arrow-callback": "error",
|
||||
"quotes": ["error", "double", {"allowTemplateLiterals": true}],
|
||||
},
|
||||
overrides: [
|
||||
{
|
||||
files: ["**/*.spec.*"],
|
||||
env: {
|
||||
mocha: true,
|
||||
},
|
||||
rules: {},
|
||||
},
|
||||
],
|
||||
globals: {},
|
||||
};
|
||||
@@ -1,7 +1,58 @@
|
||||
// functions/index.js
|
||||
|
||||
const functions = require('firebase-functions');
|
||||
|
||||
exports.helloWorld = functions.https.onRequest((request, response) => {
|
||||
response.send("Hello from Firebase!");
|
||||
const { onRequest } = require("firebase-functions/v2/https");
|
||||
|
||||
exports.helloWorld = onRequest((req, res) => {
|
||||
const jsonData = {
|
||||
"casestudy_lessons": [
|
||||
{
|
||||
"lesson_id": "NZSKGBZA0YI8",
|
||||
"lesson_tag": "YouTube",
|
||||
"lesson_url": "https://www.youtube.com/watch?v=tgUocrkP8Es&list=PLv6KfiLx9P_1uHbOn0lNz06ZsXFRls893",
|
||||
"thumbnail": "https://img.youtube.com/vi/tgUocrkP8Es/maxresdefault.jpg"
|
||||
},
|
||||
{
|
||||
"lesson_id": "EIUQAOS19PO9",
|
||||
"lesson_tag": "YouTube",
|
||||
"lesson_url": "https://www.youtube.com/watch?v=F5XLuFlhINU&list=PLv6KfiLx9P_1uHbOn0lNz06ZsXFRls893&index=2",
|
||||
"thumbnail": "https://img.youtube.com/vi/F5XLuFlhINU/maxresdefault.jpg"
|
||||
},
|
||||
{
|
||||
"lesson_id": "W1E8UI5QEASQ",
|
||||
"lesson_tag": "YouTube",
|
||||
"lesson_url": "https://www.youtube.com/watch?v=pJ_X7yPI7Ow&list=PLv6KfiLx9P_1uHbOn0lNz06ZsXFRls893&index=3",
|
||||
"thumbnail": "https://img.youtube.com/vi/pJ_X7yPI7Ow/maxresdefault.jpg"
|
||||
},
|
||||
{
|
||||
"lesson_id": "J4XJNBZ45R7Y",
|
||||
"lesson_tag": "YouTube",
|
||||
"lesson_url": "https://www.youtube.com/watch?v=UaJFeOPtEx8&list=PLv6KfiLx9P_1uHbOn0lNz06ZsXFRls893&index=4",
|
||||
"thumbnail": "https://img.youtube.com/vi/UaJFeOPtEx8/maxresdefault.jpg"
|
||||
},
|
||||
{
|
||||
"lesson_id": "WC4DS2CXAWEQ",
|
||||
"lesson_tag": "YouTube",
|
||||
"lesson_url": "https://www.youtube.com/watch?v=LXsFOrgbg_o&list=PLv6KfiLx9P_0uFZ_xpwutLxndmeRmDYgD",
|
||||
"thumbnail": "https://img.youtube.com/vi/LXsFOrgbg_o/maxresdefault.jpg"
|
||||
},
|
||||
{
|
||||
"lesson_id": "OXD8FLUNG28O",
|
||||
"lesson_tag": "YouTube",
|
||||
"lesson_url": "https://www.youtube.com/watch?v=jjm2Aabb2EE&list=PLv6KfiLx9P_0uFZ_xpwutLxndmeRmDYgD&index=2",
|
||||
"thumbnail": "https://img.youtube.com/vi/jjm2Aabb2EE/maxresdefault.jpg"
|
||||
},
|
||||
{
|
||||
"lesson_id": "C9BPD0CCBZCU",
|
||||
"lesson_tag": "영상 ID를 찾을 수 없음",
|
||||
"lesson_url": null,
|
||||
"thumbnail": null
|
||||
},
|
||||
{
|
||||
"lesson_id": "4AUOR21NV8LI",
|
||||
"lesson_tag": "영상 ID를 찾을 수 없음",
|
||||
"lesson_url": null,
|
||||
"thumbnail": null
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
res.json(jsonData);
|
||||
});
|
||||
993
functions/package-lock.json
generated
993
functions/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -2,6 +2,7 @@
|
||||
"name": "functions",
|
||||
"description": "Cloud Functions for Firebase",
|
||||
"scripts": {
|
||||
"lint": "eslint .",
|
||||
"serve": "firebase emulators:start --only functions",
|
||||
"shell": "firebase functions:shell",
|
||||
"start": "npm run shell",
|
||||
@@ -9,14 +10,16 @@
|
||||
"logs": "firebase functions:log"
|
||||
},
|
||||
"engines": {
|
||||
"node": "18"
|
||||
"node": "22"
|
||||
},
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"firebase-admin": "^12.1.0",
|
||||
"firebase-functions": "^5.0.0"
|
||||
"firebase-admin": "^12.6.0",
|
||||
"firebase-functions": "^6.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"eslint": "^8.15.0",
|
||||
"eslint-config-google": "^0.14.0",
|
||||
"firebase-functions-test": "^3.1.0"
|
||||
},
|
||||
"private": true
|
||||
|
||||
Reference in New Issue
Block a user