Change id
This commit is contained in:
parent
3bcbb57baa
commit
de04a6f76d
|
@ -88,7 +88,7 @@ describe("/rowsActions", () => {
|
|||
const res = await createRowAction(tableId, rowAction, { status: 201 })
|
||||
|
||||
expect(res).toEqual({
|
||||
_id: `${tableId}_row_actions`,
|
||||
_id: `ra_${tableId}`,
|
||||
_rev: expect.stringMatching(/^1-\w+/),
|
||||
actions: [
|
||||
{
|
||||
|
@ -110,7 +110,7 @@ describe("/rowsActions", () => {
|
|||
const res = await createRowAction(tableId, rowActions[2])
|
||||
|
||||
expect(res).toEqual({
|
||||
_id: `${tableId}_row_actions`,
|
||||
_id: `ra_${tableId}`,
|
||||
_rev: expect.stringMatching(/^3-\w+/),
|
||||
actions: rowActions.map(a => ({
|
||||
id: expect.any(String),
|
||||
|
@ -135,7 +135,7 @@ describe("/rowsActions", () => {
|
|||
const res2 = await createRowAction(otherTableId, rowAction2)
|
||||
|
||||
expect(res1).toEqual({
|
||||
_id: `${tableId}_row_actions`,
|
||||
_id: `ra_${tableId}`,
|
||||
_rev: expect.stringMatching(/^1-\w+/),
|
||||
actions: [
|
||||
{
|
||||
|
@ -149,7 +149,7 @@ describe("/rowsActions", () => {
|
|||
})
|
||||
|
||||
expect(res2).toEqual({
|
||||
_id: `${otherTableId}_row_actions`,
|
||||
_id: `ra_${otherTableId}`,
|
||||
_rev: expect.stringMatching(/^1-\w+/),
|
||||
actions: [
|
||||
{
|
||||
|
|
|
@ -355,5 +355,5 @@ export function isRelationshipColumn(
|
|||
* @returns The new row actions ID which the row actions doc can be stored under.
|
||||
*/
|
||||
export function generateRowActionsID(tableId: string) {
|
||||
return `${tableId}${SEPARATOR}row_actions`
|
||||
return `${DocumentType.ROW_ACTIONS}${SEPARATOR}${tableId}`
|
||||
}
|
||||
|
|
|
@ -39,6 +39,7 @@ export enum DocumentType {
|
|||
AUDIT_LOG = "al",
|
||||
APP_MIGRATION_METADATA = "_design/migrations",
|
||||
SCIM_LOG = "scimlog",
|
||||
ROW_ACTIONS = "ra",
|
||||
}
|
||||
|
||||
// these are the core documents that make up the data, design
|
||||
|
|
Loading…
Reference in New Issue