refactor(slots): rename checkUpdateIsTimeChanging to checkUpdateDatetime for clarity in slot update validation
This commit is contained in:
parent
3448bff1a2
commit
ae9488b2d0
@ -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);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user