main
alex 2024-01-14 23:16:59 +01:00
parent b8c3695686
commit f42f232d8b
5 changed files with 7 additions and 7 deletions

View File

@ -10,7 +10,6 @@ import {
CALENDAR_MAX_FUTURE_BOOKING_DAYS, CALENDAR_MAX_FUTURE_BOOKING_DAYS,
CALENDAR_MAX_SERVICE_DURATION, CALENDAR_MAX_SERVICE_DURATION,
CALENDAR_MIN_EARLIEST_BOOKING_TIME, CALENDAR_MIN_EARLIEST_BOOKING_TIME,
CALENDAR_PRIMARY_CALENDAR_ID,
CALENDAR_USING_PRIMARY_CALENDAR, CALENDAR_USING_PRIMARY_CALENDAR,
Roles, Roles,
} from "../utils/constants"; } from "../utils/constants";
@ -84,7 +83,6 @@ export async function SignUp(req: Request, res: Response) {
name: username, name: username,
calendar_max_future_booking_days: CALENDAR_MAX_FUTURE_BOOKING_DAYS, calendar_max_future_booking_days: CALENDAR_MAX_FUTURE_BOOKING_DAYS,
calendar_min_earliest_booking_time: CALENDAR_MIN_EARLIEST_BOOKING_TIME, calendar_min_earliest_booking_time: CALENDAR_MIN_EARLIEST_BOOKING_TIME,
calendar_primary_calendar_id: CALENDAR_PRIMARY_CALENDAR_ID,
calendar_using_primary_calendar: CALENDAR_USING_PRIMARY_CALENDAR, calendar_using_primary_calendar: CALENDAR_USING_PRIMARY_CALENDAR,
calendar_max_service_duration: CALENDAR_MAX_SERVICE_DURATION, calendar_max_service_duration: CALENDAR_MAX_SERVICE_DURATION,
}) })

View File

@ -7,7 +7,7 @@ interface StoreAttributes {
name: string; name: string;
calendar_max_future_booking_days: number; calendar_max_future_booking_days: number;
calendar_min_earliest_booking_time: number; calendar_min_earliest_booking_time: number;
calendar_primary_calendar_id: string; calendar_primary_calendar_id?: string;
calendar_using_primary_calendar: boolean; calendar_using_primary_calendar: boolean;
calendar_max_service_duration: number; calendar_max_service_duration: number;
} }
@ -49,7 +49,7 @@ Store.init(
}, },
calendar_primary_calendar_id: { calendar_primary_calendar_id: {
type: DataTypes.STRING, type: DataTypes.STRING,
allowNull: false, // allowNull defaults to true
}, },
calendar_using_primary_calendar: { calendar_using_primary_calendar: {
type: DataTypes.BOOLEAN, type: DataTypes.BOOLEAN,

View File

@ -58,9 +58,11 @@ User.init(
}, },
calendar_max_future_booking_days: { calendar_max_future_booking_days: {
type: DataTypes.INTEGER, type: DataTypes.INTEGER,
allowNull: false,
}, },
calendar_min_earliest_booking_time: { calendar_min_earliest_booking_time: {
type: DataTypes.INTEGER, type: DataTypes.INTEGER,
allowNull: false,
}, },
calendar_primary_calendar_id: { calendar_primary_calendar_id: {
type: DataTypes.STRING, type: DataTypes.STRING,

View File

@ -58,9 +58,9 @@ router.get(
axios axios
.post(process.env.TERMIN_PLANNER_URL as string, { .post(process.env.TERMIN_PLANNER_URL as string, {
user_id: userSession.user_id, userId: userSession.user_id,
accessToken: accessToken, accessToken: accessToken,
refresh_token: refreshToken, refreshToken: refreshToken,
pass: process.env.TERMIN_PLANNER_AUTHORIZATION_PASSWORD as string, pass: process.env.TERMIN_PLANNER_AUTHORIZATION_PASSWORD as string,
}) })
.then((response) => { .then((response) => {

View File

@ -36,7 +36,7 @@ export const STORE_SERVICE_ACTIVITY_DURATION_MAX =
export const CALENDAR_MAX_FUTURE_BOOKING_DAYS = 14; export const CALENDAR_MAX_FUTURE_BOOKING_DAYS = 14;
export const CALENDAR_MIN_EARLIEST_BOOKING_TIME = 1; export const CALENDAR_MIN_EARLIEST_BOOKING_TIME = 1;
export const CALENDAR_PRIMARY_CALENDAR_ID = ""; //export const CALENDAR_PRIMARY_CALENDAR_ID = "";
export const CALENDAR_USING_PRIMARY_CALENDAR = false; export const CALENDAR_USING_PRIMARY_CALENDAR = false;
export const CALENDAR_MAX_SERVICE_DURATION = 1440; // 24 hours in minutes export const CALENDAR_MAX_SERVICE_DURATION = 1440; // 24 hours in minutes