refactor(slots): rename checkUpdateIsTimeChanging to checkUpdateDatetime for clarity in slot update validation

This commit is contained in:
vchikalkin 2025-08-05 10:43:28 +03:00
parent 3448bff1a2
commit ae9488b2d0

View File

@ -166,7 +166,7 @@ export class SlotsService extends BaseService {
async updateSlot(variables: VariablesOf<typeof GQL.UpdateSlotDocument>) {
await this.checkUpdatePermission(variables);
await this.checkUpdateIsTimeChanging(variables);
await this.checkUpdateDatetime(variables);
const { mutate } = await getClientWithToken();
@ -223,7 +223,7 @@ export class SlotsService extends BaseService {
}
}
private async checkUpdateIsTimeChanging(variables: VariablesOf<typeof GQL.UpdateSlotDocument>) {
private async checkUpdateDatetime(variables: VariablesOf<typeof GQL.UpdateSlotDocument>) {
const { slot } = await this.getSlot({ documentId: variables.documentId });
if (!slot) throw new Error(ERRORS.SLOT_NOT_FOUND);