Skip to content

Commit

Permalink
feat: also replicate the photo property to supabase
Browse files Browse the repository at this point in the history
  • Loading branch information
th0rgall committed Aug 7, 2024
1 parent f375c09 commit 32b5ffb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions api/src/replication/onCampsitesWrite.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module.exports = async (change) => {
await replicate({
change,
tableName: 'campsites',
// Omit photo-related props and legacy props
pick: ['description', 'location', 'facilities', 'listed', 'createTime', 'updateTime']
// Omit legacy props
pick: ['description', 'location', 'facilities', 'listed', 'createTime', 'updateTime', 'photo']
});
};
3 changes: 3 additions & 0 deletions src/lib/types/Garden.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ export type Garden = {
*/
location: null | LongLat;
facilities: GardenFacilities;
/**
* The data of this is most often: 'garden.jpg', 'garden.JPG', 'garden.JPEG', ...
*/
photo:
| {
files?: null | File | File[];
Expand Down

0 comments on commit 32b5ffb

Please sign in to comment.