Skip to content

Conversation

@sakithb
Copy link
Collaborator

@sakithb sakithb commented Aug 30, 2025

  • ui
  • add bottom margin
  • endpoint + tests
  • fix failing test
  • wip

@sakithb sakithb marked this pull request as ready for review September 1, 2025 04:38
Copy link
Member

@supun-io supun-io left a comment

Choose a reason for hiding this comment

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

Update all controllers to use AuthorizqtionListener::getUser and remove uses of getUser()

sakithb and others added 5 commits September 12, 2025 12:17
# Conflicts:
#	backend/composer.json
#	backend/composer.lock
#	backend/src/Api/App/Controller/CollectionController.php
#	backend/src/Api/App/Controller/PublicationController.php
#	backend/src/Repository/CollectionUserRepository.php
Copy link
Member

@Nadil-K Nadil-K left a comment

Choose a reason for hiding this comment

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

  • Add a test for POST /collections
  • In the frontend, move API calls to a separate ts file (See this)

throw new AccessDeniedHttpException('Authentication required');
}

$data = json_decode($request->getContent() ?: 'null', true);
Copy link
Member

Choose a reason for hiding this comment

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

  • Populate a typed input object with #[MapRequestPayload].
  • Do the validations within that object class.


return $this->json([
'publication' => new \App\Api\App\Object\PublicationObject($publication),
'created' => $created,
Copy link
Member

Choose a reason for hiding this comment

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

Why do we need these created and attached booleans? Within the current codebase, I don't see any instance of it being used. Shall we remove it @supun-io?

$attached = false;

if (!$publication) {
$publication = $this->publicationService->createPublication($collection, $url, $title ?: null);
Copy link
Member

Choose a reason for hiding this comment

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

  • Add an optional parameter flush = true for createPublication and within the function, only flush the EntityManager if it's true.
  • In this case, set that bool to false since we flush it again below.
  • Do the same for attachToCollectionIfMissing.

{/snippet}
</Modal>

<slot />
Copy link
Member

Choose a reason for hiding this comment

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

  • <slot /> is deprecated in Svelte 5. Use {@render children()} instead.

{/snippet}
</Modal>

<Modal
Copy link
Member

Choose a reason for hiding this comment

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

  • Duplicate

</div>
</Modal>

<Modal bind:show={showAddPublicationModal} size="small" title="Add Publication" closeOnOutsideClick={true} closeOnEscape={true}>
Copy link
Member

Choose a reason for hiding this comment

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

  • Duplicate

{collection.name}
</ActionListItem>
{/each}
<ActionListItem on:select={() => { showCreateCollectionModal = true; showCollections = false; }}>
Copy link
Member

Choose a reason for hiding this comment

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

  • Use a Button instead

@Nadil-K Nadil-K changed the base branch from main to issue/38 September 25, 2025 16:14
@Nadil-K Nadil-K merged commit ab1856e into issue/38 Sep 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants