Skip to content

Commit

Permalink
remove unused statement
Browse files Browse the repository at this point in the history
  • Loading branch information
HarmlessHarm committed Nov 8, 2024
1 parent 7320fcd commit 223770f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
8 changes: 3 additions & 5 deletions src/utils/exports/SignupsPerDay.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ export default class UserDataExport extends BaseDataExport {
const from = this.date2timestamp(this.config.fields[0].value.from);
const to = this.date2timestamp(this.config.fields[0].value.to);

this.header = ["date", "count"];
try {
this.header = ["date", "count"];
const users = await this.fetchUsersInRange(from, to);
this.rows = await this.aggregateSignups(users);
return this.rows;
Expand All @@ -54,11 +54,9 @@ export default class UserDataExport extends BaseDataExport {
const user_ref = db.ref("users").orderByChild("created").startAt(from).endAt(to);
const payload = await user_ref.once("value");
if (!payload.exists()) {
throw "No users found";
throw new Error("No users found");
}
const users = Object.values(payload.val());

return users;
return Object.values(payload.val());
}

async aggregateSignups(users) {
Expand Down
2 changes: 1 addition & 1 deletion src/utils/exports/SubscriptionDataExport.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { db, functions } from "src/firebase";
import { db } from "src/firebase";
import { makeDate } from "../generalFunctions";
import BaseDataExport from "./BaseDataExport";

Expand Down
1 change: 0 additions & 1 deletion src/views/Admin/ExportCSV.vue
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ export default {
methods: {
async downloadCSV() {
const exporter = this.data_export.exporter;
this.data_export;
const rows = await exporter.getCSVRows();
exporter.exportToCSV();
},
Expand Down

0 comments on commit 223770f

Please sign in to comment.