Skip to content

Commit 6dba25d

Browse files
committed
gitignore fix
1 parent cd3b681 commit 6dba25d

2 files changed

Lines changed: 17 additions & 1 deletion

File tree

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Logs
2-
logs
2+
/logs
33
*.log
44
npm-debug.log*
55
yarn-debug.log*
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import { addStore, InMemoryStore } from '@furystack/core'
2+
import type { Injector } from '@furystack/inject'
3+
import { getRepository } from '@furystack/repository'
4+
import { ServiceLogEntry } from 'common'
5+
6+
import { authorizedDataSet } from '../../config.js'
7+
8+
export const setupLogStore = async (injector: Injector) => {
9+
let autoId = 0
10+
11+
addStore(injector, new InMemoryStore({ model: ServiceLogEntry, primaryKey: 'id' }))
12+
getRepository(injector).createDataSet(ServiceLogEntry, 'id', {
13+
...authorizedDataSet,
14+
modifyOnAdd: async ({ entity }) => ({ ...entity, id: ++autoId }),
15+
})
16+
}

0 commit comments

Comments
 (0)