Skip to content

Commit

Permalink
Merge pull request #1473 from ThatConference/next/feature
Browse files Browse the repository at this point in the history
fix: edit activity not found or no permissions to it
  • Loading branch information
brettski authored Oct 3, 2023
2 parents bcd6844 + 6f85c8d commit fb9d66a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "that-us",
"version": "3.13.5",
"version": "3.13.6",
"description": "THAT.us website",
"main": "index.js",
"type": "module",
Expand Down
7 changes: 7 additions & 0 deletions src/routes/activities/edit/+layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import dayjs from 'dayjs';
import isSameOrBefore from 'dayjs/plugin/isSameOrBefore.js';
import isBetween from 'dayjs/plugin/isBetween.js';
import lodash from 'lodash';
import { error } from '@sveltejs/kit';

import eventsApi from '$dataSources/api.that.tech/events/queries';
import sessionsQueryApi from '$dataSources/api.that.tech/sessions/queries';
Expand Down Expand Up @@ -47,6 +48,12 @@ export const load = auth0.withPageAuthRequired({
queryEventsByCommunity()
]);

if (!activityDetails) {
throw new error(404, {
message: 'Activity Not Found'
});
}

return {
activityDetails,
events,
Expand Down

1 comment on commit fb9d66a

@vercel
Copy link

@vercel vercel bot commented on fb9d66a Oct 3, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.