Skip to content

Commit

Permalink
rename
Browse files Browse the repository at this point in the history
  • Loading branch information
ledyba committed May 9, 2022
1 parent 3aba271 commit f385976
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions server/src/shelf/Shelf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,12 +127,12 @@ class Shelf {
}

async updateMoment(req: protocol.Moment.Save.Request): Promise<Moment> {
const m = await this.makeMoment(req);
const m = await this.makeMomentFromRequest(req);
if (req.originalDate === null) {
// new
await this.repo.insertMoment(m);
} else {
// replace
// update
const oldTimestamp = parseMomentTime(req.originalDate);
if (!oldTimestamp.isValid()) {
throw new Error(`Invalid old date: ${req.originalDate}`);
Expand All @@ -156,7 +156,7 @@ class Shelf {
async deleteMoment(timestamp: dayjs.Dayjs): Promise<boolean> {
return await this.repo.deleteMoment(timestamp);
}
private async makeMoment(req: protocol.Moment.Save.Request): Promise<Moment> {
private async makeMomentFromRequest(req: protocol.Moment.Save.Request): Promise<Moment> {
let date = req.date;
let iconID: string | undefined = undefined;
const doc = fml.parse(req.text);
Expand Down

0 comments on commit f385976

Please sign in to comment.