From 8b35d3068baada2769b6c6101353e2111ab8d1c6 Mon Sep 17 00:00:00 2001 From: "mirko.milovanovic@studenti.unimi.it" Date: Sun, 30 Mar 2025 17:47:17 +0000 Subject: [PATCH] Delete convert-to-ts.js --- server/peertube data/convert-to-ts.js | 63 --------------------------- 1 file changed, 63 deletions(-) delete mode 100644 server/peertube data/convert-to-ts.js diff --git a/server/peertube data/convert-to-ts.js b/server/peertube data/convert-to-ts.js deleted file mode 100644 index 0bb9985..0000000 --- a/server/peertube data/convert-to-ts.js +++ /dev/null @@ -1,63 +0,0 @@ -/* global use, db */ -// MongoDB Playground -// To disable this template go to Settings | MongoDB | Use Default Template For Playground. -// Make sure you are connected to enable completions and to be able to run a playground. -// Use Ctrl+Space inside a snippet or a string literal to trigger completions. -// The result of the last command run in a playground is shown on the results panel. -// By default the first 20 documents will be returned with a cursor. -// Use 'console.log()' to print to the debug output. -// For more documentation on playgrounds please refer to -// https://www.mongodb.com/docs/mongodb-vscode/playgrounds/ -use("statistics"); - -db.peertube.aggregate([ - { - $set: { - player: { - $function: { - lang: "js", - args: ["$player"], - body: function (str) { - try { - return JSON.parse(str); - } catch (e) { - if (typeof str === "object") { - return str; - } else { - return null; - } - } - }, - }, - }, - peers: { - $function: { - lang: "js", - args: ["$peers"], - body: function (str) { - try { - return JSON.parse(str); - } catch (e) { - if (typeof str === "object") { - return str; - } else { - return null; - } - } - }, - }, - }, - }, - }, - { - $out: { - db: "statistics", - coll: "peertube_ts", - timeseries: { - timeField: "timestamp", - metaField: "tags", - granularity: "seconds", - }, - }, - }, -]);