@better-giving/endowment 4.0.31 → 4.0.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/db.mjs +1 -4
- package/package.json +1 -1
- package/src/db.mts +2 -6
package/dist/db.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import crypto from "node:crypto";
|
|
2
2
|
import { BatchGetCommand, DeleteCommand, GetCommand, PutCommand, QueryCommand, TransactWriteCommand, UpdateCommand, } from "@aws-sdk/lib-dynamodb";
|
|
3
3
|
import { Db, Txs, UpdateBuilder, } from "@better-giving/db";
|
|
4
|
+
import { projection } from "@better-giving/db/helpers";
|
|
4
5
|
import KSUID from "ksuid";
|
|
5
6
|
import { med_key_filter, med_sk, to_imedia } from "./media.mjs";
|
|
6
7
|
import { npo_fields } from "./npo.mjs";
|
|
7
|
-
import { projection } from "@better-giving/db/helpers";
|
|
8
8
|
export class NpoDb extends Db {
|
|
9
9
|
static table = "endowments_v3";
|
|
10
10
|
static slug_env_gsi = "slug-env-gsi";
|
|
@@ -264,9 +264,6 @@ export class NpoDb extends Db {
|
|
|
264
264
|
updates.set("slug", slug);
|
|
265
265
|
if (slug === "")
|
|
266
266
|
updates.remove("slug");
|
|
267
|
-
if (target || target === "0") {
|
|
268
|
-
updates.set("target", target);
|
|
269
|
-
}
|
|
270
267
|
if (social_media_urls) {
|
|
271
268
|
for (const [k, v] of Object.entries(social_media_urls)) {
|
|
272
269
|
if (v === undefined)
|
package/package.json
CHANGED
package/src/db.mts
CHANGED
|
@@ -15,6 +15,7 @@ import {
|
|
|
15
15
|
UpdateBuilder,
|
|
16
16
|
type UpdateComps,
|
|
17
17
|
} from "@better-giving/db";
|
|
18
|
+
import { projection } from "@better-giving/db/helpers";
|
|
18
19
|
import KSUID from "ksuid";
|
|
19
20
|
import type {
|
|
20
21
|
IMedia,
|
|
@@ -28,6 +29,7 @@ import type {
|
|
|
28
29
|
TNpoDbProjectedTo,
|
|
29
30
|
} from "./interfaces.mjs";
|
|
30
31
|
import { med_key_filter, med_sk, to_imedia } from "./media.mjs";
|
|
32
|
+
import { npo_fields } from "./npo.mjs";
|
|
31
33
|
import type {
|
|
32
34
|
IMediaSearchObj,
|
|
33
35
|
IMediaUpdate,
|
|
@@ -42,8 +44,6 @@ import type {
|
|
|
42
44
|
IProgramUpdate,
|
|
43
45
|
TMediaType,
|
|
44
46
|
} from "./schema.mjs";
|
|
45
|
-
import { npo_fields } from "./npo.mjs";
|
|
46
|
-
import { projection } from "@better-giving/db/helpers";
|
|
47
47
|
|
|
48
48
|
export class NpoDb extends Db {
|
|
49
49
|
static readonly table = "endowments_v3";
|
|
@@ -353,10 +353,6 @@ export class NpoDb extends Db {
|
|
|
353
353
|
if (slug) updates.set("slug", slug);
|
|
354
354
|
if (slug === "") updates.remove("slug");
|
|
355
355
|
|
|
356
|
-
if (target || target === "0") {
|
|
357
|
-
updates.set("target", target);
|
|
358
|
-
}
|
|
359
|
-
|
|
360
356
|
if (social_media_urls) {
|
|
361
357
|
for (const [k, v] of Object.entries(social_media_urls)) {
|
|
362
358
|
if (v === undefined) continue;
|