Skip to content

Commit

Permalink
Fix build?
Browse files Browse the repository at this point in the history
  • Loading branch information
HugoGresse committed Oct 13, 2024
1 parent c78dd37 commit e7429d3
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 21 deletions.
40 changes: 20 additions & 20 deletions functions/src/api/routes/sessionsSpeakers/sessionsSpeakers.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ vi.mock('../../dao/firebasePlugin', async (importOriginal) => {
}
})

describe('overwriteSpeakerSessions', () => {
describe('sessionsSpeakers', () => {
const eventId = 'xEventIdx'
let fastify = setupFastify()

Expand All @@ -22,7 +22,7 @@ describe('overwriteSpeakerSessions', () => {
})

test('should return a 400 if body is not provided', async () => {
const res = await fastify.inject({ method: 'post', url: `/v1/${eventId}/overwriteSpeakerSponsors` })
const res = await fastify.inject({ method: 'post', url: `/v1/${eventId}/sessions-speakers` })
expect(res.statusCode).to.equal(400)
expect(JSON.parse(res.body)).toMatchObject({
error: 'FST_ERR_VALIDATION',
Expand All @@ -31,7 +31,7 @@ describe('overwriteSpeakerSessions', () => {
test('should return a 401 if no apiKey is provided but the body has a valid content', async () => {
const res = await fastify.inject({
method: 'post',
url: `/v1/${eventId}/overwriteSpeakerSponsors`,
url: `/v1/${eventId}/sessions-speakers`,
payload: {
sessions: [],
speakers: [],
Expand All @@ -51,7 +51,7 @@ describe('overwriteSpeakerSessions', () => {
})
const res = await fastify.inject({
method: 'post',
url: `/v1/${eventId}/overwriteSpeakerSponsors?apiKey=xxx`,
url: `/v1/${eventId}/sessions-speakers?apiKey=xxx`,
payload: {
sessions: [],
speakers: [],
Expand All @@ -71,7 +71,7 @@ describe('overwriteSpeakerSessions', () => {
})
const res = await fastify.inject({
method: 'post',
url: `/v1/${eventId}/overwriteSpeakerSponsors?apiKey=xxx`,
url: `/v1/${eventId}/sessions-speakers?apiKey=xxx`,
payload: {
sessions: [
{
Expand Down Expand Up @@ -116,7 +116,7 @@ describe('overwriteSpeakerSessions', () => {
})
const res = await fastify.inject({
method: 'post',
url: `/v1/${eventId}/overwriteSpeakerSponsors?apiKey=xxx`,
url: `/v1/${eventId}/sessions-speakers?apiKey=xxx`,
payload: {
sessions: [
{
Expand Down Expand Up @@ -195,7 +195,7 @@ describe('overwriteSpeakerSessions', () => {
})
const res = await fastify.inject({
method: 'post',
url: `/v1/${eventId}/overwriteSpeakerSponsors?apiKey=xxx`,
url: `/v1/${eventId}/sessions-speakers?apiKey=xxx`,
payload: {
sessions: [
{
Expand Down Expand Up @@ -263,7 +263,7 @@ describe('overwriteSpeakerSessions', () => {
})
const res = await fastify.inject({
method: 'post',
url: `/v1/${eventId}/overwriteSpeakerSponsors?apiKey=xxx`,
url: `/v1/${eventId}/sessions-speakers?apiKey=xxx`,
payload: {
sessions: [
{
Expand Down Expand Up @@ -346,7 +346,7 @@ describe('overwriteSpeakerSessions', () => {
})
const res = await fastify.inject({
method: 'post',
url: `/v1/${eventId}/overwriteSpeakerSponsors?apiKey=xxx`,
url: `/v1/${eventId}/sessions-speakers?apiKey=xxx`,
payload: {
sessions: [
{
Expand Down Expand Up @@ -415,7 +415,7 @@ describe('overwriteSpeakerSessions', () => {
})
const res = await fastify.inject({
method: 'post',
url: `/v1/${eventId}/overwriteSpeakerSponsors?apiKey=xxx`,
url: `/v1/${eventId}/sessions-speakers?apiKey=xxx`,
payload: {
sessions: [
{
Expand Down Expand Up @@ -468,7 +468,7 @@ describe('overwriteSpeakerSessions', () => {
})
const res = await fastify.inject({
method: 'post',
url: `/v1/${eventId}/overwriteSpeakerSponsors?apiKey=xxx`,
url: `/v1/${eventId}/sessions-speakers?apiKey=xxx`,
payload: {
sessions: [
{
Expand Down Expand Up @@ -561,7 +561,7 @@ describe('overwriteSpeakerSessions', () => {
})
const res = await fastify.inject({
method: 'post',
url: `/v1/${eventId}/overwriteSpeakerSponsors?apiKey=xxx`,
url: `/v1/${eventId}/sessions-speakers?apiKey=xxx`,
payload: {
sessions: [
{
Expand Down Expand Up @@ -631,7 +631,7 @@ describe('overwriteSpeakerSessions', () => {
})
const res = await fastify.inject({
method: 'post',
url: `/v1/${eventId}/overwriteSpeakerSponsors?apiKey=xxx`,
url: `/v1/${eventId}/sessions-speakers?apiKey=xxx`,
payload: {
sessions: [
{
Expand Down Expand Up @@ -685,7 +685,7 @@ describe('overwriteSpeakerSessions', () => {
})
const res = await fastify.inject({
method: 'post',
url: `/v1/${eventId}/overwriteSpeakerSponsors?apiKey=xxx`,
url: `/v1/${eventId}/sessions-speakers?apiKey=xxx`,
payload: {
sessions: [
{
Expand Down Expand Up @@ -736,7 +736,7 @@ describe('overwriteSpeakerSessions', () => {
})
const res = await fastify.inject({
method: 'post',
url: `/v1/${eventId}/overwriteSpeakerSponsors?apiKey=xxx`,
url: `/v1/${eventId}/sessions-speakers?apiKey=xxx`,
payload: {
sessions: [
{
Expand Down Expand Up @@ -786,7 +786,7 @@ describe('overwriteSpeakerSessions', () => {
})
const res = await fastify.inject({
method: 'post',
url: `/v1/${eventId}/overwriteSpeakerSponsors?apiKey=xxx`,
url: `/v1/${eventId}/sessions-speakers?apiKey=xxx`,
payload: {
sessions: [
{
Expand Down Expand Up @@ -839,7 +839,7 @@ describe('overwriteSpeakerSessions', () => {
})
const res = await fastify.inject({
method: 'post',
url: `/v1/${eventId}/overwriteSpeakerSponsors?apiKey=xxx`,
url: `/v1/${eventId}/sessions-speakers?apiKey=xxx`,
payload: {
sessions: [
{
Expand Down Expand Up @@ -882,7 +882,7 @@ describe('overwriteSpeakerSessions', () => {
})
const res = await fastify.inject({
method: 'post',
url: `/v1/${eventId}/overwriteSpeakerSponsors?apiKey=xxx`,
url: `/v1/${eventId}/sessions-speakers?apiKey=xxx`,
payload: {
sessions: [
{
Expand Down Expand Up @@ -932,7 +932,7 @@ describe('overwriteSpeakerSessions', () => {
})
const res = await fastify.inject({
method: 'post',
url: `/v1/${eventId}/overwriteSpeakerSponsors?apiKey=xxx`,
url: `/v1/${eventId}/sessions-speakers?apiKey=xxx`,
payload: {
sessions: [
{
Expand Down Expand Up @@ -1062,7 +1062,7 @@ describe('overwriteSpeakerSessions', () => {
})
const res = await fastify.inject({
method: 'post',
url: `/v1/${eventId}/overwriteSpeakerSponsors?apiKey=xxx`,
url: `/v1/${eventId}/sessions-speakers?apiKey=xxx`,
payload: {
sessions: [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ const ReplyType = Type.Union([

export const sessionsSpeakers = (fastify: FastifyInstance, options: any, done: () => any) => {
fastify.post<{ Querystring: IQuerystring; Body: StaticTypeOfSpeakerSessionsType; Reply: Static<typeof ReplyType> }>(
'/v1/:eventId/sessionsSpeakers',
'/v1/:eventId/sessions-speakers',
{
schema: {
tags: ['speakers', 'sessions'],
Expand Down

0 comments on commit e7429d3

Please sign in to comment.