mobile-directing-system / mds-desktop

Desktop app for Mobile Directing System
https://mobile-directing-system.github.io/mds-desktop
MIT License
1 stars 3 forks source link

[BUG]: Cannot create/update phone channel #288

Closed atlars closed 9 months ago

atlars commented 9 months ago

Bug Description

Cannot create/update phone channel in channel list. Could be a backend related problem.

Expected Behavior

PUT http://localhost:30080/address-book/entries/455a0c8e-f8ab-4d92-81fd-56c7a138d110/channels should not return 400 Bad Request

Steps to Reproduce

PUT http://localhost:30080/address-book/entries/455a0c8e-f8ab-4d92-81fd-56c7a138d110/channels Payload:

[
    {
        "id": "91fe7883-64f4-448e-abd2-177f306fa685",
        "entry": "455a0c8e-f8ab-4d92-81fd-56c7a138d110",
        "is_active": true,
        "label": "Phone",
        "type": "phone",
        "min_importance": 0,
        "priority": 50,
        "details": {
            "phone": "342845389289243"
        },
        "timeout": 600000000000
    },
    {
        "id": "bea69de0-59c8-4619-b317-137ee626a645",
        "entry": "455a0c8e-f8ab-4d92-81fd-56c7a138d110",
        "is_active": true,
        "label": "E-Mail",
        "type": "email",
        "min_importance": 500,
        "priority": 50,
        "details": {
            "email": "fff@test.de"
        },
        "timeout": 600000000000
    },
    {
        "id": "9569df9e-cd12-47e6-afc0-a9be23b7710e",
        "entry": "455a0c8e-f8ab-4d92-81fd-56c7a138d110",
        "is_active": true,
        "label": "Funk 1",
        "type": "radio",
        "min_importance": 0,
        "priority": 50,
        "details": {
            "info": "Kanal 3"
        },
        "timeout": 600000000000
    }
]

Possible Solutions

No response

Further Information

No response

atlars commented 9 months ago

Backend error message

{
    "level": "DEBUG",
    "ts": "2023-10-11T15:30:55Z",
    "logger": "logistics-svc.endpoints",
    "msg": "store channel from public: parse details: unsupported channel type",
    "x_code": "bad-input",
    "0/http_req_url": "/address-book/entries/455a0c8e-f8ab-4d92-81fd-56c7a138d110/channels",
    "0/http_req_host": "134.60.152.185:30080",
    "0/http_req_method": "PUT",
    "0/http_req_user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36",
    "0/http_req_remote_addr": "10.42.0.14:56262",
    "3/chan_type": "phone",
    "4/type": "phone",
    "1/token":
    {
        "user_id": "dd7e7c89-d5ef-4e98-b19c-79619a1b2a6e",
        "username": "admin",
        "is_authenticated": true,
        "is_admin": true,
        "permissions":
        [],
        "randomSalt": ""
    },
    "3/chan_details":
    {
        "phone": "1245523"
    },
    "x_err_message": "store channel from public: parse details: unsupported channel type"
}
atlars commented 9 months ago

Channel type should be named phone-call