mirror of
https://github.com/coder/coder.git
synced 2025-07-15 22:20:27 +00:00
feat(coderd): add inbox notifications endpoints (#16889)
This PR is part of the inbox notifications topic, and rely on previous PRs merged - it adds : - Endpoints to : - WS : watch new inbox notifications - REST : list inbox notifications - REST : update the read status of a notification Also, this PR acts as a follow-up PR from previous work and : - fix DB query issues - fix DBMem logic to match DB
This commit is contained in:
@ -73,7 +73,7 @@ func TestInbox(t *testing.T) {
|
||||
t.Run(tc.name, func(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
db, _ := dbtestutil.NewDB(t)
|
||||
db, pubsub := dbtestutil.NewDB(t)
|
||||
|
||||
if tc.payload.UserID == "valid" {
|
||||
user := dbgen.User(t, db, database.User{})
|
||||
@ -82,7 +82,7 @@ func TestInbox(t *testing.T) {
|
||||
|
||||
ctx := context.Background()
|
||||
|
||||
handler := dispatch.NewInboxHandler(logger.Named("smtp"), db)
|
||||
handler := dispatch.NewInboxHandler(logger.Named("smtp"), db, pubsub)
|
||||
dispatcherFunc, err := handler.Dispatcher(tc.payload, "", "", nil)
|
||||
require.NoError(t, err)
|
||||
|
||||
|
Reference in New Issue
Block a user