Search Header Logo
The Complete Strapi™ Course with Plugins and Deployment - Post Likes: Part 1

The Complete Strapi™ Course with Plugins and Deployment - Post Likes: Part 1

Assessment

Interactive Video

Information Technology (IT), Architecture

University

Practice Problem

Hard

Created by

Wayground Content

FREE Resource

The video tutorial explains how to implement a post likes feature in a Strapi application. It covers creating a two-sided relation between user and post collections, setting up a custom route for liking posts, and developing a controller action to handle the likes. The tutorial emphasizes the importance of allowing only authenticated users to like posts and discusses error handling and route access control.

Read more

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Why is a simple counter not sufficient for tracking post likes?

It is not compatible with Strapi.

It doesn't prevent multiple likes from the same user.

It is too complex to implement.

It requires too much storage space.

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What type of relationship is created between users and posts for the likes feature?

Many-to-many

One-to-many

One-to-one

Self-referential

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the main advantage of using a two-sided relationship for likes?

It reduces the number of database queries.

It simplifies the database schema.

It improves the performance of the application.

It allows tracking which users liked which posts.

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of creating a custom route for the like post feature?

To simplify the existing routes

To manage the specific task of liking a post

To handle post updates more efficiently

To allow public users to like posts

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which HTTP method is used for the like post API endpoint?

PUT

GET

POST

DELETE

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How is the 'like' action identified in the API path?

By using a query parameter

By appending '/like' to the post ID

By using a different HTTP method

By specifying it in the request body

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What error code is returned if an unauthenticated user tries to like a post?

404 Not Found

403 Forbidden

400 Bad Request

401 Unauthorized

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?