mirror of
https://github.com/marcogll/formbricks_form_manager.git
synced 2026-01-13 21:35:17 +00:00
refactor: Reformat admin view and update survey mapping database files.
This commit is contained in:
@@ -6,10 +6,20 @@ const {
|
||||
updateEnvironmentAlias,
|
||||
getSurveysByEnvironment,
|
||||
updateSurveySlug,
|
||||
refreshSurveyCache,
|
||||
} = require("../services/formbricks");
|
||||
|
||||
router.use(ensureAdminToken);
|
||||
|
||||
router.post("/sync", async (req, res) => {
|
||||
try {
|
||||
await refreshSurveyCache();
|
||||
res.json({ status: "ok", message: "Surveys synced successfully" });
|
||||
} catch (error) {
|
||||
res.status(500).json({ error: error.message });
|
||||
}
|
||||
});
|
||||
|
||||
router.get("/environments", (req, res) => {
|
||||
try {
|
||||
const environments = getAllEnvironments();
|
||||
|
||||
Reference in New Issue
Block a user