forked from andyburke/autonomous.contact
fix: ensure we are loading events properly during fsdb scan
fix: various styling issues on smaller screens fix: map z-index
This commit is contained in:
parent
873773bc91
commit
2d12104875
10 changed files with 126 additions and 38 deletions
|
|
@ -1,5 +1,5 @@
|
|||
import lurid from '@andyburke/lurid';
|
||||
import { get_session, get_user, PRECHECK_TABLE, require_user, user_has_write_permission_for_event } from '../../../utils/prechecks.ts';
|
||||
import { get_session, get_user, PRECHECK_TABLE, require_user, user_has_create_permission_for_event } from '../../../utils/prechecks.ts';
|
||||
import * as CANNED_RESPONSES from '../../../utils/canned_responses.ts';
|
||||
import { EVENT, EVENTS, VALIDATE_EVENT } from '../../../models/event.ts';
|
||||
import parse_body from '../../../utils/bodyparser.ts';
|
||||
|
|
@ -39,7 +39,14 @@ export async function GET(request: Request, meta: Record<string, any>): Promise<
|
|||
const {
|
||||
event_type,
|
||||
event_id
|
||||
} = /^.*\/events\/(?<event_type>.*?)\/.*\/(?<event_id>[A-Za-z-]+)\.json$/.exec(entry.path)?.groups ?? {};
|
||||
} = /^.*\/events\/.*\/(?<event_type>.*?)\:(?<event_id>[A-Za-z-]+)\.json$/.exec(entry.path)?.groups ?? {};
|
||||
|
||||
console.dir({
|
||||
entry,
|
||||
event_type,
|
||||
event_id,
|
||||
query: meta.query
|
||||
});
|
||||
|
||||
if (meta.query.after_id && event_id <= meta.query.after_id) {
|
||||
return false;
|
||||
|
|
@ -210,7 +217,7 @@ export async function POST(req: Request, meta: Record<string, any>): Promise<Res
|
|||
});
|
||||
}
|
||||
|
||||
if (!user_has_write_permission_for_event(meta.user, event)) {
|
||||
if (!user_has_create_permission_for_event(meta.user, event)) {
|
||||
return CANNED_RESPONSES.permission_denied();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue