Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
kalilsn committed Feb 26, 2025
1 parent 0ff5ea0 commit 91c7dcf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
10 changes: 1 addition & 9 deletions core/lib/server/form.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import { defaultComponent } from "schemas";

import type { CommunitiesId, FormsId, PublicSchema, PubsId, PubTypesId, UsersId } from "db/public";
import { AuthTokenType, ElementType, InputComponent, StructuralFormElement } from "db/public";
import { logger } from "logger";

import type { XOR } from "../types";
import type { GetPubTypesResult } from "./pubtype";
Expand Down Expand Up @@ -216,14 +215,7 @@ export const insertForm = (
isDefault: boolean,
trx = db
) => {
logger.debug({ msg: "inserting form", pubType, name });
const ranks = mudder.base62.mudder(
undefined,
undefined,
pubType.fields.length + 1,
undefined,
(pubType.fields.length + 1) * 20
);
const ranks = mudder.base62.mudder(pubType.fields.length + 1);

return trx
.with("form", (db) =>
Expand Down
5 changes: 5 additions & 0 deletions core/lib/server/pub.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1205,6 +1205,11 @@ export const updatePub = async ({
return result;
};

/**
* Adds an appropriate "rank" attribute to each related pub value passed in, based on the highest
* existing rank on the relevant pub. Returns all the pub values passed in.
*/

const getRankedValues = async ({
pubId,
pubValues,
Expand Down

0 comments on commit 91c7dcf

Please sign in to comment.