Fixed: Sync courses

This commit is contained in:
philipp lang 2021-11-18 02:01:55 +01:00
parent d42cee55af
commit ff50f3a523
3 changed files with 3 additions and 3 deletions
app/Initialize
packages
tests/Feature/Initialize

View File

@ -75,7 +75,7 @@ class InitializeMembers {
]);
foreach ($this->api->coursesFor($member->id) as $course) {
$m->courses()->attach(Course::where('nami_id', $course->course_id)->firstOrFail(), [
$m->courses()->attach(Course::where('name', $course->course_name)->firstOrFail(), [
'organizer' => $course->organizer,
'event_name' => $course->event_name,
'completed_at' => $course->completed_at,

@ -1 +1 @@
Subproject commit 2ac35dd8c5226234ccc5755fe77530dfb5ffc4de
Subproject commit 4753cbef2ec1c677f01fcfbfcf362e3651d87799

View File

@ -127,7 +127,7 @@ class InitializeTest extends TestCase
$this->withoutExceptionHandling();
$this->initializeProvider(function($backend) {
$backend->fakeMembers([
$this->member(['courses' => [ ['bausteinId' => 506, 'id' => 788, 'veranstalter' => 'KJA', 'vstgName' => 'eventname', 'vstgTag' => '2021-11-12 00:00:00'] ]])
$this->member(['courses' => [ ['entries_baustein' => '1a', 'entries_id' => 788, 'entries_veranstalter' => 'KJA', 'entries_vstgName' => 'eventname', 'entries_vstgTag' => '2021-11-12 00:00:00'] ]])
]);
});
$this->post('/login', [