fix: gunakan author_id (bukan user_id) di PostObserver dan MemberPointSeeder

This commit is contained in:
2026-04-04 08:25:27 +07:00
parent 5e70336774
commit 61cbc75caf
3 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -25,7 +25,7 @@ class MemberPointSeeder extends Seeder
// Poin dari artikel yang sudah published
Post::where('status', 'published')->each(function ($post) {
MemberPoint::firstOrCreate(
['user_id' => $post->user_id, 'source_type' => 'post', 'source_id' => $post->id],
['user_id' => $post->author_id, 'source_type' => 'post', 'source_id' => $post->id],
['points' => 5, 'reason' => "Artikel dipublikasi: {$post->title}"]
);
});