mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-28 18:26:54 +00:00
f68b471d6d
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com> Co-authored-by: Huyen Nguyen <25715018+huyenltnguyen@users.noreply.github.com>
35 lines
891 B
TypeScript
35 lines
891 B
TypeScript
import { Type } from '@fastify/type-provider-typebox';
|
|
|
|
export const updateMyExperience = {
|
|
body: Type.Object({
|
|
experience: Type.Array(
|
|
Type.Object(
|
|
{
|
|
id: Type.String(),
|
|
title: Type.String(),
|
|
company: Type.String(),
|
|
location: Type.Optional(Type.String()),
|
|
startDate: Type.String(),
|
|
endDate: Type.Optional(Type.String()),
|
|
description: Type.String()
|
|
},
|
|
{ additionalProperties: false }
|
|
)
|
|
)
|
|
}),
|
|
response: {
|
|
200: Type.Object({
|
|
message: Type.Literal('flash.experience-updated'),
|
|
type: Type.Literal('success')
|
|
}),
|
|
400: Type.Object({
|
|
message: Type.Literal('flash.wrong-updating'),
|
|
type: Type.Literal('danger')
|
|
}),
|
|
500: Type.Object({
|
|
message: Type.Literal('flash.wrong-updating'),
|
|
type: Type.Literal('danger')
|
|
})
|
|
}
|
|
};
|