/*
 * AUTH_APPROVE.pgc - au 모듈 서비스 AUTH_APPROVE (one service = one file).
 * 승인 확정(pending->approved): dbio 래퍼로 상태만 A 로 확정.
 * Kept as the plain dbio-wrapper skeleton (cf. AUTH_HOLD = inline UPDATE ... IN,
 * AUTH_RELEASE = SELECT-then-UPDATE) so the three status transitions stay
 * structurally distinct. Runs on the caller's XA branch. Advertised by au_svr.
 */
#include "AUTH_APPROVE.h"

void AUTH_APPROVE(TPSVCINFO *p)
{
    UBFH *b = (UBFH *)p->data;
    long auth_id = getl(b, T_ID1);
    if (audb_update_auth_status(auth_id, "A") < 0) FAIL(b);
    Bchg(b, T_STATUS, 0, "A", 0L);
    OK(b);
}
