Skip to content

Commit

Permalink
removed test logs
Browse files Browse the repository at this point in the history
  • Loading branch information
rgerum committed Dec 17, 2023
1 parent fad3b1c commit 041071b
Show file tree
Hide file tree
Showing 8 changed files with 2 additions and 15 deletions.
4 changes: 1 addition & 3 deletions src/app/(stories)/(main)/course_list.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,10 @@ ORDER BY COALESCE(NULLIF(c.name, ''), l2.name);

async function LanguageGroup({ name, tag, id }) {
let courses = await get_courses(tag ? tag : "main");
console.log("vcourses", courses);

let localisation = await get_localisation(id);
let courses_list = courses[id];

console.log("LanguageGroup", name, tag, id);
if (!courses_list) return <>no list {name}</>;

return (
Expand Down Expand Up @@ -69,7 +68,6 @@ async function CourseListInner({ loading, tag }) {
);
}
let course_groups = await get_courses_list(tag ? tag : "main");
console.log("course_groups", course_groups);
return (
<>
{course_groups?.map((group) => (
Expand Down
3 changes: 0 additions & 3 deletions src/app/(stories)/(main)/language_button.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { cache, Suspense } from "react";
import { sql } from "lib/db";
import get_localisation from "lib/get_localisation";
import FlagById from "components/layout/flag_by_id";
import { unstable_cache } from "next/cache";

let get_courses = cache(async () => {
let courses = await sql`
Expand Down Expand Up @@ -53,8 +52,6 @@ export default async function LanguageButton({ course_id, loading }) {
}
let localisation = await get_localisation(course.from_language);

console.log("id", course, course.learning_language);

return (
<Link
data-cy={"language_button_big_" + course.short}
Expand Down
1 change: 0 additions & 1 deletion src/app/(stories)/(main)/page.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ WHERE s.public AND NOT s.deleted AND c.public`

export default async function Page({}) {
const counts = await get_counts();
console.log("get_counts", counts);

// Render data...
return (
Expand Down
1 change: 0 additions & 1 deletion src/app/(stories)/learn/page.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ export default async function Page() {

if (session?.user) {
let last_course = await get_last_course(session?.user?.name);
console.log(last_course, session?.user?.name, session.user);
redirect("/" + last_course.short);
}

Expand Down
1 change: 0 additions & 1 deletion src/app/(stories)/story/[story_id]/page.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ export async function get_story(story_id) {
data.learning_language = res[0]["learning_language"];
data.learning_language_long = res[0]["learning_language_long"];
data.learning_language_rtl = res[0]["learning_language_rtl"];
console.log(data);
return data;
}

Expand Down
1 change: 0 additions & 1 deletion src/app/admin/story/[story_id]/story_display.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ export default function StoryDisplay({ story }) {
public: !story_.public,
});
let data = await res.json();
console.log(data);
setStory(data);
}
async function deleteApproval(approval_id) {
Expand Down
1 change: 0 additions & 1 deletion src/app/editor/(course)/approve/[story_id]/route.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ async function set_approve({ story_id, user_id }) {
await sql`SELECT COUNT(id) as count FROM story_approval WHERE story_id = ${story_id};`
)[0];
let count = parseInt(res2.count);
console.log(count);
let status = undefined;
if (count === 0) status = "draft";
if (count === 1) status = "feedback";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { getToken } from "next-auth/jwt";
import { insert, sql } from "lib/db";
import { sql } from "lib/db";
import { upload_github } from "lib/editor/upload_github";
import { NextResponse } from "next/server";

Expand Down Expand Up @@ -29,9 +29,6 @@ async function set_import({ id, course_id }, { user_id, username }) {

data["author"] = user_id;
data["course_id"] = course_id;
data["api"] = 2;

console.log(data);

let data2 = (
await sql`INSERT INTO story ${sql(data, [
Expand Down

0 comments on commit 041071b

Please sign in to comment.