muni-logo

Task 09 - Server actions, Database

This week, your task is to rework task number 6 to use Server actions instead of API endpoints and asynchronous React Server Components to retrieve data instead of useQuery. You are provided with a correct solution of task number 6.

Maximum points40 points
Deadline
April 21, 2025

Changes to functionality

The final functionality required is exactly the same as in problem number 6, except:

Requirements

Tips

const roleSchema = z.enum(['santa', 'user']);
 
const users = sqliteTable('users', {
  ...
 
  role: text('role', { enum: roleSchema.options }),
})

Video

Click to see the video

Submission

There should be created a pull request called "Feedback" immediately after accepting the github classroom assignment.

If you have a Feedback pull request

You can push your solution straight to main. You will then see the diff against main in the pull request feedback. Once you have the solution in main, mark the Feedback PR as submitted.

If you don't have a Feedback pull request

It may be that it will be created later, or it may not be created at all... Therefore, as a precaution, create a new branch solution from main as soon as you accept the assignment, and then push your solution to it.